tkalkirill commented on code in PR #4839:
URL: https://github.com/apache/ignite-3/pull/4839#discussion_r1871497858
##########
modules/metastorage/src/test/java/org/apache/ignite/internal/metastorage/server/BasicOperationsKeyValueStorageTest.java:
##########
@@ -2195,6 +2199,48 @@ void testClear() {
assertThrows(CompactedException.class, () ->
storage.revisionByTimestamp(hybridTimestamp(2)));
}
+ @ParameterizedTest
+ @EnumSource(UpdateRevisionOperation.class)
+ void
testNotifyUpdateRevisionForOperationAfterStartWatches(UpdateRevisionOperation
updateRevisionOperation) {
+ var revisionUpdateListener = new TestRevisionUpdateListener();
+ storage.registerRevisionUpdateListener(revisionUpdateListener);
+
+ var watchEventHandlingCallback = new TestWatchEventHandlingCallback();
+ storage.startWatches(1, watchEventHandlingCallback);
+
+ storage.put(key(0), keyValue(0, 1), kvContext(hybridTimestamp(10)));
+
+ long revision = storage.revision();
+ long newRevision = revision + 1;
+
+ updateRevisionOperation.execute(storage);
+
+ assertThat(storage.revision(), equalTo(newRevision));
+ assertThat(revisionUpdateListener.get(newRevision), willSucceedFast());
Review Comment:
I think everything will be fine.
--
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]