Cyrill commented on code in PR #7395:
URL: https://github.com/apache/ignite-3/pull/7395#discussion_r2694190075


##########
modules/transactions/src/integrationTest/java/org/apache/ignite/internal/disaster/ItDisasterRecoveryReconfigurationTest.java:
##########
@@ -1490,13 +1502,21 @@ void testAssignmentsChainUpdatedOnAutomaticReset() 
throws Exception {
 
         stopNodesInParallel(3, 4, 5, 6);
 
-        int firstPhaseReset = getNodeForFirstPhaseReset(partId, 0, 1, 2);
-
-        Assignments link2FirstPhaseReset = Assignments.of(Set.of(
-                Assignment.forPeer(node(firstPhaseReset).name())
-        ), timestamp);
+        // Wait for first phase of reset to complete.
+        // The reset selects the node with the highest raft log index (or 
lexicographically first on tie).
+        Set<String> aliveNodes = Set.of(node(0).name(), node(1).name(), 
node(2).name());
+        await().atMost(60, SECONDS)
+                .until(() -> {
+                    Assignments stable = getStableAssignments(node0, partId);
+                    return stable != null
+                            && stable.nodes().size() == 1
+                            && 
aliveNodes.contains(stable.nodes().iterator().next().consistentId());
+                });
 
-        assertStableAssignments(node0, partId, link2FirstPhaseReset, 60_000);
+        // Read the actual stable assignments - this is what the system 
selected.
+        Assignments link2FirstPhaseReset = getStableAssignments(node0, partId);
+        String selectedNode = 
link2FirstPhaseReset.nodes().iterator().next().consistentId();

Review Comment:
   No. The only case when we have one node in stable is the first phase of 
reset. I cannot change



-- 
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]

Reply via email to