You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2022/06/07 13:55:51 UTC

[GitHub] [ignite-3] tmagomedov commented on a diff in pull request #861: IGNITE-17124 Better support of storages in Storage API tests

tmagomedov commented on code in PR #861:
URL: https://github.com/apache/ignite-3/pull/861#discussion_r891263461


##########
modules/storage-api/src/test/java/org/apache/ignite/internal/storage/AbstractPartitionStorageTest.java:
##########
@@ -168,13 +168,13 @@ public void scanFiltered() throws Exception {
         storage.write(dataRow1);
         storage.write(dataRow2);
 
-        List<DataRow> list = toList(storage.scan(key -> key.keyBytes()[3] == '1'));
+        List<DataRow> list = toList(storage.scan(key -> key.key().get(key.key().limit() - 1) == '1'));

Review Comment:
   This will fail in case DataRow has IEP-54 tuple inside.



##########
modules/storage-api/src/test/java/org/apache/ignite/internal/storage/AbstractPartitionStorageTest.java:
##########
@@ -168,13 +168,13 @@ public void scanFiltered() throws Exception {
         storage.write(dataRow1);
         storage.write(dataRow2);
 
-        List<DataRow> list = toList(storage.scan(key -> key.keyBytes()[3] == '1'));
+        List<DataRow> list = toList(storage.scan(key -> key.key().get(key.key().limit() - 1) == '1'));
 
         assertThat(list, hasSize(1));
 
         assertArrayEquals(dataRow1.value().array(), list.get(0).value().array());
 
-        list = toList(storage.scan(key -> key.keyBytes()[3] == '2'));
+        list = toList(storage.scan(key -> key.key().get(key.key().limit() - 1) == '2'));

Review Comment:
   This will fail in case DataRow has IEP-54 tuple inside.



-- 
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-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org