diff --git a/src/test/java/io/lettuce/core/RedisClientIntegrationTests.java b/src/test/java/io/lettuce/core/RedisClientIntegrationTests.java index 57eb8d2bbc..22a8671745 100644 --- a/src/test/java/io/lettuce/core/RedisClientIntegrationTests.java +++ b/src/test/java/io/lettuce/core/RedisClientIntegrationTests.java @@ -139,7 +139,10 @@ void shouldPropagateCommandTimeoutToCommandListener() throws InterruptedExceptio assertThat(commandListener.succeeded).isEmpty(); Wait.untilTrue(() -> commandListener.failed.size() == 1); - assertThat(commandListener.failed).extracting(it -> it.getCommand().getType()).contains(CommandType.BLPOP); + Wait.untilTrue(() -> + commandListener.failed.stream().anyMatch(command -> + command.getCommand().getType().equals(CommandType.BLPOP))); + FastShutdown.shutdown(client); }