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


##########
modules/transactions/src/integrationTest/java/org/apache/ignite/internal/disaster/ItDisasterRecoveryReconfigurationTest.java:
##########
@@ -1700,6 +1702,110 @@ void testGracefulRewritesChainAfterForceReset() throws 
Exception {
         assertAssignmentsChain(node0, partId, 
AssignmentsChain.of(finalAssignments));
     }
 
+    /**
+     * Lease agreement message should be the first message sent after reset.
+     */
+    @Test
+    @Disabled("https://issues.apache.org/jira/browse/IGNITE-25644";)
+    @ZoneParams(nodes = 3, replicas = 3, partitions = 1)
+    void testLeaseResendOnManualReset() throws Exception {
+        int partId = 0;
+
+        IgniteImpl node0 = igniteImpl(0);
+        Table table = node0.tables().table(TABLE_NAME);
+
+        ReplicaMeta primaryBeforeReset = awaitPrimaryReplica(node0, partId);
+        logger().info("Primary replica before reset is {}", 
primaryBeforeReset);
+
+        assertRealAssignments(node0, partId, 0, 1, 2);
+
+        List<Throwable> errors = insertValues(table, partId, 0);
+        assertThat(errors, is(empty()));
+
+        stopNodesInParallel(1, 2);
+
+        AtomicBoolean thisMessageShouldBeLease = new AtomicBoolean(false);
+
+        blockMessage((nodeName, msg) -> {
+            logger().info("Received message {}", msg);
+
+            if (msg instanceof ActionResponse) {
+                return false;
+            }
+
+            if (thisMessageShouldBeLease.getAndSet(false) && 
!isLeaseMessage(msg)) {
+                // Not working at the moment.
+                logger().info("Lease message expected. Received " + msg + " 
instead");
+                fail("Lease message expected. Received " + msg + " instead");
+            }
+
+            if (isResetMessage(msg, partId)) {
+                // If this is a reset message then we need to check that the 
next message is a lease message.

Review Comment:
   Changed that



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to