nizhikov commented on code in PR #11673: URL: https://github.com/apache/ignite/pull/11673#discussion_r1908311116
########## modules/control-utility/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java: ########## @@ -752,6 +774,174 @@ public void testIdleVerifyOnInactiveClusterWithPersistence() throws Exception { assertContains(log, testOut.toString(), "The check procedure has finished, no conflicts have been found."); } + /** + * + */ + @Test + public void testIdleVerifyCancelCommandOnCheckpoint() throws Exception { + final int gridsCnt = 4; + + IgniteEx srv = startGrids(gridsCnt); + + srv.cluster().state(ACTIVE); + + CountDownLatch beforeCancelLatch = new CountDownLatch(1); + + CountDownLatch afterCancelLatch = new CountDownLatch(1); + + GridCacheDatabaseSharedManager dbMgr = + (GridCacheDatabaseSharedManager)grid(1).context().cache().context().database(); + + dbMgr.addCheckpointListener(new CheckpointListener() { + @Override public void beforeCheckpointBegin(Context ctx) { + if (ctx.progress().reason().equals("VerifyBackupPartitions")) + beforeCancelLatch.countDown(); + } + + @Override public void afterCheckpointEnd(Context ctx) throws IgniteCheckedException { + if (ctx.progress().reason().equals("VerifyBackupPartitions")) + try { + afterCancelLatch.await(); + } + catch (InterruptedException e) { + throw new IgniteInterruptedCheckedException(e); + } Review Comment: ```suggestion if (ctx.progress().reason().equals("VerifyBackupPartitions")) { try { afterCancelLatch.await(); } catch (InterruptedException e) { throw new IgniteInterruptedCheckedException(e); } } ``` -- 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