Vladsz83 commented on code in PR #10454:
URL: https://github.com/apache/ignite/pull/10454#discussion_r1054308042
##########
modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteClusterSnapshotSelfTest.java:
##########
@@ -1224,6 +1224,32 @@ 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);
Review Comment:
To be sure: `failNodeSpi.blockMessages((n, msg) -> msg instanceof
SingleNodeMessage && ((SingleNodeMessage)msg).type() ==
START_SNAPSHOT.ordinal());` ?
##########
modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteClusterSnapshotSelfTest.java:
##########
@@ -1224,6 +1224,32 @@ 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);
Review Comment:
To be sure: `failNodeSpi.blockMessages((n, msg) -> msg instanceof
SingleNodeMessage && ((SingleNodeMessage)msg).type() ==
START_SNAPSHOT.ordinal());` ? WDYT
--
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]