sanpwc commented on code in PR #5179:
URL: https://github.com/apache/ignite-3/pull/5179#discussion_r1949371231


##########
modules/partition-replicator/src/integrationTest/java/org/apache/ignite/internal/partition/replicator/ItZoneDataReplicationTest.java:
##########
@@ -397,13 +398,72 @@ void testDataRebalance(boolean truncateRaftLog) throws 
Exception {
 
         setPrimaryReplica(newNode, zonePartitionId);
 
+        // Wait for the data to appear. At the moment of writing, we don't 
have any partition safe time to wait for and
+        // the primary replica has been assigned manually, so there's no 
guarantee that the data has been replicated.
+        // Not using "assertTrue" on purpose, the next line will produce a 
nicer error message.
+        // TODO: remove this line after 
https://issues.apache.org/jira/browse/IGNITE-22620
+        waitForCondition(() -> kvView1.getAll(null, 
data1.keySet()).equals(data1), 10_000L);
+
         assertThat(kvView1.getAll(null, data1.keySet()), is(data1));
         assertThat(kvView1.getAll(null, data2.keySet()), is(anEmptyMap()));
 
         assertThat(kvView2.getAll(null, data1.keySet()), is(anEmptyMap()));
         assertThat(kvView2.getAll(null, data2.keySet()), is(data2));
     }
 
+    /**
+     * Tests the recovery phase, when a node is restarted and we expect the 
data to be restored by the Raft mechanisms.
+     */
+    @ParameterizedTest(name = "truncateRaftLog={0}")
+    @ValueSource(booleans = {false, true})
+    void testLocalRaftLogReapplication(boolean truncateRaftLog) throws 
Exception {

Review Comment:
   I almost sure that we will loose given test on switching main towards 
colocation track.



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