Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cyip10 committed Jun 20, 2024
1 parent 990a2ba commit 03da06c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
8 changes: 4 additions & 4 deletions java/client/src/test/java/glide/api/RedisClientTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -568,16 +568,16 @@ public void getex_options() {
.thenReturn(testResponse);

when(commandManager.<String>submitNewCommand(eq(GetEx), eq(arguments2), any()))
.thenReturn(testResponse);
.thenReturn(testResponse);

when(commandManager.<String>submitNewCommand(eq(GetEx), eq(arguments3), any()))
.thenReturn(testResponse);
.thenReturn(testResponse);

when(commandManager.<String>submitNewCommand(eq(GetEx), eq(arguments4), any()))
.thenReturn(testResponse);
.thenReturn(testResponse);

when(commandManager.<String>submitNewCommand(eq(GetEx), eq(arguments5), any()))
.thenReturn(testResponse);
.thenReturn(testResponse);

// exercise
CompletableFuture<String> response1 = service.getex("key", options1);
Expand Down
5 changes: 3 additions & 2 deletions java/integTest/src/test/java/glide/SharedCommandTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,9 @@ public void getex(BaseClient client) {
String data = client.getex(key1).get();
assertEquals(data, value1);

Long ttlValue = Long.valueOf(client.get(key1).get());
assert ttlValue >= -0L;
data = client.getex(key1, GetExOptions.Seconds(10L)).get();
Long ttlValue = client.ttl(key1).get();
assert ttlValue >= 0L;

// non-existent key
data = client.getex(key2).get();
Expand Down

0 comments on commit 03da06c

Please sign in to comment.