Skip to content

Commit

Permalink
Java: Fix flaky IT. (#1656)
Browse files Browse the repository at this point in the history
Java: Fix flaky IT. (#390)

Signed-off-by: Yury-Fridlyand <[email protected]>
  • Loading branch information
Yury-Fridlyand authored Jun 26, 2024
1 parent 1bee371 commit 4b6b5ee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion java/integTest/src/test/java/glide/cluster/CommandTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -1253,6 +1253,7 @@ public void functionStats_and_functionKill_without_route() {
}

assertEquals(OK, clusterClient.functionKill().get());
Thread.sleep(404); // sometimes kill doesn't happen immediately

exception =
assertThrows(ExecutionException.class, () -> clusterClient.functionKill().get());
Expand Down Expand Up @@ -1339,7 +1340,7 @@ public void functionStats_and_functionKill_with_route(boolean singleNodeRoute) {

// redis kills a function with 5 sec delay
assertEquals(OK, clusterClient.functionKill(route).get());
Thread.sleep(404);
Thread.sleep(404); // sometimes kill doesn't happen immediately

exception =
assertThrows(ExecutionException.class, () -> clusterClient.functionKill(route).get());
Expand Down Expand Up @@ -1410,6 +1411,7 @@ public void functionStats_and_functionKill_with_key_based_route() {

// redis kills a function with 5 sec delay
assertEquals(OK, clusterClient.functionKill(route).get());
Thread.sleep(404); // sometimes kill doesn't happen immediately

exception =
assertThrows(ExecutionException.class, () -> clusterClient.functionKill(route).get());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,7 @@ public void functionStats_and_functionKill() {

// redis kills a function with 5 sec delay
assertEquals(OK, regularClient.functionKill().get());
Thread.sleep(404); // sometimes kill doesn't happen immediately

exception =
assertThrows(ExecutionException.class, () -> regularClient.functionKill().get());
Expand Down

0 comments on commit 4b6b5ee

Please sign in to comment.