diff --git a/java/integTest/src/test/java/glide/SharedCommandTests.java b/java/integTest/src/test/java/glide/SharedCommandTests.java index 2e837e3d7b..fe0bd07b0e 100644 --- a/java/integTest/src/test/java/glide/SharedCommandTests.java +++ b/java/integTest/src/test/java/glide/SharedCommandTests.java @@ -7463,12 +7463,12 @@ public void hscan(BaseClient client) { // Test match pattern result = client.hscan(key1, initialCursor, HScanOptions.builder().matchPattern("*").build()).get(); - assertNotEquals(0, result[resultCursorIndex].toString()); + assertTrue(Long.parseLong(result[resultCursorIndex].toString()) >= 0); assertTrue(ArrayUtils.getLength(result[resultCollectionIndex]) >= defaultCount); // Test count result = client.hscan(key1, initialCursor, HScanOptions.builder().count(20L).build()).get(); - assertNotEquals("0", result[resultCursorIndex].toString()); + assertTrue(Long.parseLong(result[resultCursorIndex].toString()) >= 0); assertTrue(ArrayUtils.getLength(result[resultCollectionIndex]) >= 20); // Test count with match returns a non-empty list @@ -7477,7 +7477,7 @@ public void hscan(BaseClient client) { .hscan( key1, initialCursor, HScanOptions.builder().matchPattern("1*").count(20L).build()) .get(); - assertTrue(Long.parseLong(result[resultCursorIndex].toString()) > 0); + assertTrue(Long.parseLong(result[resultCursorIndex].toString()) >= 0); assertTrue(ArrayUtils.getLength(result[resultCollectionIndex]) > 0); // Exceptions