tkalkirill commented on code in PR #6330: URL: https://github.com/apache/ignite-3/pull/6330#discussion_r2239651989
########## modules/low-watermark/src/test/java/org/apache/ignite/internal/lowwatermark/LowWatermarkImplTest.java: ########## @@ -336,6 +342,36 @@ void testUpdateAndNotifyNotInvokeFailureManagerWhenGetNodeStoppingException() { verify(failureManager, never()).process(any()); } + @Test + void testParallelScheduleUpdates() throws Exception { + assertThat(lowWatermarkConfig.updateIntervalMillis().update(300L), willCompleteSuccessfully()); + + assertThat(lowWatermark.startAsync(new ComponentContext()), willCompleteSuccessfully()); + + runRace( + () -> lowWatermark.scheduleUpdates(), + () -> lowWatermark.scheduleUpdates(), + () -> lowWatermark.scheduleUpdates(), + () -> lowWatermark.scheduleUpdates() + ); + + Thread.sleep(1_000); + + verify(lwmChangedListener, atLeast(2)).notify(any()); Review Comment: Because the interval is 300ms, then after 1 second, regardless of the platform (well, I suppose so), at least 2 watermark updates will be performed, in normal systems it should of course be 3, but I don’t want a flaky test. -- 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