tkalkirill commented on code in PR #6199:
URL: https://github.com/apache/ignite-3/pull/6199#discussion_r2192015883


##########
modules/metastorage/src/test/java/org/apache/ignite/internal/metastorage/server/WatchProcessorTest.java:
##########
@@ -288,6 +289,48 @@ void nodeStoppingExceptionDoesNotTriggerFailureManager() {
         verify(failureManager, never()).process(any());
     }
 
+    @Test
+    void 
eventNotificationUpdatesMetastoreSafeTimeAfterNotifyingWatchListeners() {
+        CompletableFuture<Void> listenerFuture = new CompletableFuture<>();
+        WatchListener listener = mock(WatchListener.class);
+        when(listener.onUpdate(any())).thenReturn(listenerFuture);
+
+        watchProcessor.addWatch(new Watch(0, listener, key -> 
Arrays.equals(key, "foo".getBytes(UTF_8))));
+
+        var entry1 = new EntryImpl("foo".getBytes(UTF_8), null, 1, TIMESTAMP);
+        HybridTimestamp ts = new HybridTimestamp(1, 2);
+
+        watchProcessor.notifyWatches(1, List.of(entry1), ts);
+
+        verify(watchEventHandlingCallback, 
timeout(100).times(0)).onSafeTimeAdvanced(any());

Review Comment:
   Maybe 250ms? It's up to you.



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