alievmirza commented on code in PR #4828: URL: https://github.com/apache/ignite-3/pull/4828#discussion_r1873248107
########## modules/raft/src/integrationTest/java/org/apache/ignite/raft/jraft/core/ItNodeTest.java: ########## @@ -2811,6 +2816,292 @@ public void testLeaderPropagatedBeforeVote() throws Exception { assertFalse(res, "The follower shouldn't stop following"); } + /** + * INSTALLING_SNAPSHOT is discarded only when: + * - the snapshot is installed correctly + * - if a leader dies and a new one is elected, the new leader installs a new snapshot + * - the node is restarted (INSTALLING_SNAPSHOT is stored in memory only) + */ + @Test + public void testNodeWillNeverGetOutOfSnapshot() throws Exception { + CompletableFuture<Void> snapshotFuture = new CompletableFuture<>(); + + // Create a group of 3 nodes, A,B and C. + // Start nodes A and B, node C remains not started. + List<TestPeer> peers = TestUtils.generatePeers(testInfo, 3); + + // Here we need custom SnapshotCopier that is capable of pausing snapshot installation. + BiConsumer<PeerId, NodeOptions> nodeOptionsConsumer = (peerId, nodeOptions) -> { Review Comment: Please move this to a utility method, you copy-paste code in all added tests -- 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