diff --git a/java/integTest/src/test/java/glide/SharedCommandTests.java b/java/integTest/src/test/java/glide/SharedCommandTests.java index 2ffc611ac8..ae62ef6ce9 100644 --- a/java/integTest/src/test/java/glide/SharedCommandTests.java +++ b/java/integTest/src/test/java/glide/SharedCommandTests.java @@ -7446,12 +7446,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 @@ -7460,7 +7460,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