kgusakov commented on code in PR #2698:
URL: https://github.com/apache/ignite-3/pull/2698#discussion_r1371609085
##########
modules/runner/src/integrationTest/java/org/apache/ignite/internal/rebalance/ItRebalanceDistributedTest.java:
##########
@@ -587,6 +587,59 @@ void testRebalanceWithTheSameNodes() throws Exception {
verifyThatRaftNodesAndReplicasWereStartedOnlyOnce();
}
+ @Test
+ void testRaftClientsUpdatesAfterRebalance() throws Exception {
+ Node node = getNode(0);
+
+ createZone(node, ZONE_NAME, 1, 1);
+
+ createTable(node, ZONE_NAME, TABLE_NAME);
+
+ assertTrue(waitForCondition(() -> getPartitionClusterNodes(node,
0).size() == 1, AWAIT_TIMEOUT_MILLIS));
+
+ Set<Assignment> assignmentsBeforeRebalance =
getPartitionClusterNodes(node, 0);
+
+ Node newNodeForAssignment = nodes.stream().filter(n ->
+
!assignmentsBeforeRebalance.contains(Assignment.forPeer(n.clusterService.nodeName()))).findFirst().get();
+
+ Set<Assignment> newAssignment =
Set.of(Assignment.forPeer(newNodeForAssignment.clusterService.nodeName()));
+
+ // Write the new assignments to metastore as a pending assignments.
+ {
Review Comment:
The cheapest way to create the separate block with finite logic and linked
comment. I use it in tests sometimes to increase the readability and to not
spam the test class with one-shot methods. If this practice looks so
extraordinary, I can remove it
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]