sanpwc commented on code in PR #2227:
URL: https://github.com/apache/ignite-3/pull/2227#discussion_r1236601472
##########
modules/metastorage/src/test/java/org/apache/ignite/internal/metastorage/server/BasicOperationsKeyValueStorageTest.java:
##########
@@ -190,6 +192,67 @@ void getWithRevisionBound() {
assertFalse(key3EntryBounded5.empty());
}
+ @Test
+ void getEntriesWithRevisionLowerUpperBound() {
+ byte[] key1 = key(1);
+ byte[] key2 = key(2);
+
+ byte[] val1 = keyValue(1, 1);
+ byte[] val2 = keyValue(1, 2);
+ byte[] val3 = keyValue(2, 3);
+ byte[] val4 = keyValue(1, 4);
+ byte[] val5 = keyValue(1, 5);
+ byte[] val6 = keyValue(2, 6);
+ byte[] val7 = keyValue(2, 7);
+ byte[] val8 = keyValue(1, 8);
+ byte[] val9 = keyValue(1, 9);
+
+ assertEquals(0, storage.revision());
+ assertEquals(0, storage.updateCounter());
+
+ putToMs(key1, val1);
+ putToMs(key1, val2);
+ putToMs(key2, val3);
+ putToMs(key1, val4);
+ putToMs(key1, val5);
+ putToMs(key2, val6);
+ putToMs(key2, val7);
+ putToMs(key1, val8);
+ putToMs(key1, val9);
+
+ assertEquals(9, storage.revision());
+ assertEquals(9, storage.updateCounter());
+
+ List<Entry> entries1 = storage.getEntries(key1, 2, 5);
Review Comment:
It's difficult to understand which test scenarios are assumed here. Please
add comments that will explain the details. Also seems that some tests are
missing for example ones that will return empty list if there are no data in
proposed revisions boundaries.
--
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]