[ https://issues.apache.org/jira/browse/IGNITE-18766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17711032#comment-17711032 ]
Ignite TC Bot commented on IGNITE-18766: ---------------------------------------- {panel:title=Branch: [pull/10640/head] Base: [master] : No blockers found!|borderStyle=dashed|borderColor=#ccc|titleBGColor=#D6F7C1}{panel} {panel:title=Branch: [pull/10640/head] Base: [master] : New Tests (1)|borderStyle=dashed|borderColor=#ccc|titleBGColor=#D6F7C1} {color:#00008b}Basic 1{color} [[tests 1|https://ci2.ignite.apache.org/viewLog.html?buildId=7132563]] * {color:#013220}IgniteBasicTestSuite: GridProjectionForCachesSelfTest.testProjectionWithBadId - PASSED{color} {panel} [TeamCity *--> Run :: All* Results|https://ci2.ignite.apache.org/viewLog.html?buildId=7132674&buildTypeId=IgniteTests24Java8_RunAll] > Incorrect id check in ClusterGroupAdapter.forNodeId > --------------------------------------------------- > > Key: IGNITE-18766 > URL: https://issues.apache.org/jira/browse/IGNITE-18766 > Project: Ignite > Issue Type: Bug > Affects Versions: 2.14 > Reporter: Pavel Tupitsyn > Assignee: Denis Kuznetsov > Priority: Minor > Labels: ise, newbie > Fix For: 2.15 > > Time Spent: 20m > Remaining Estimate: 0h > > ClusterGroup.forNodeId checks *id* in a loop instead of *id0*: > {code:java} > for (UUID id0 : ids) { > if (contains(id)) > nodeIds.add(id0); > } > {code} > https://github.com/apache/ignite/blob/3de1dc44f53ea510328badf6cb6b423fe6975bd8/modules/core/src/main/java/org/apache/ignite/internal/cluster/ClusterGroupAdapter.java#L461 > The following unit test demonstrates the problem: > {code:java} > @Test > public void testProjectionWithBadId() { > ClusterNode locNode = ignite.cluster().localNode(); > ClusterGroup prj = ignite.cluster().forNodeId(UUID.randomUUID(), > locNode.id()); > Collection<ClusterNode> nodes = prj.nodes(); > assertEquals(1, nodes.size()); > } > {code} > (add to GridProjectionForCachesSelfTest) -- This message was sent by Atlassian Jira (v8.20.10#820010)