Vladsz83 commented on code in PR #10454:
URL: https://github.com/apache/ignite/pull/10454#discussion_r1054157679


##########
modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteClusterSnapshotSelfTest.java:
##########
@@ -1224,6 +1224,31 @@ public void testClusterSnapshotFinishedTryCancel() 
throws Exception {
         assertSnapshotCacheKeys(snpIg.cache(dfltCacheCfg.getName()));
     }
 
+    /** @throws Exception If fails. */
+    @Test
+    public void testClientHandlesSnapshotFailOnStartStage() throws Exception {
+        Ignite ignite = startGridsWithCache(2, dfltCacheCfg, CACHE_KEYS_RANGE);
+
+        Ignite cln = startClientGrid();
+
+        TestRecordingCommunicationSpi failNodeSpi = 
TestRecordingCommunicationSpi.spi(grid(1));
+
+        failNodeSpi.blockMessages((n, msg) -> msg instanceof 
SingleNodeMessage);
+
+        IgniteFuture<Void> fut = 
ignite.snapshot().createSnapshot(SNAPSHOT_NAME);
+
+        failNodeSpi.waitForBlocked(1, 10_000L);
+
+        grid(1).close();
+
+        assertThrowsAnyCause(log,
+            fut::get,
+            ClusterTopologyException.class,
+            "Snapshot operation interrupted, because baseline node left the 
cluster");
+
+        assertTrue(G.allGrids().contains(cln));

Review Comment:
   Test look flacky. Think we should wait for the client gone catching 
NODE_LEFT/NODE_FAILED event.



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