FaultTolerantRedisClusterClientTest: increase blpop timeouts to make tests more reliable

This commit is contained in:
Chris Eager 2024-12-27 14:23:49 -06:00 committed by GitHub
parent 541bf968e5
commit 9121032114
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -107,13 +107,13 @@ class FaultTolerantRedisClusterClientTest {
cluster = buildCluster(null, ClientResources.builder()); cluster = buildCluster(null, ClientResources.builder());
final ExecutionException asyncException = assertThrows(ExecutionException.class, final ExecutionException asyncException = assertThrows(ExecutionException.class,
() -> cluster.withCluster(connection -> connection.async().blpop(2 * TIMEOUT.toMillis() / 1000d, "key")) () -> cluster.withCluster(connection -> connection.async().blpop(10 * TIMEOUT.toMillis() / 1000d, "key"))
.get()); .get());
assertInstanceOf(RedisCommandTimeoutException.class, asyncException.getCause()); assertInstanceOf(RedisCommandTimeoutException.class, asyncException.getCause());
assertThrows(RedisCommandTimeoutException.class, assertThrows(RedisCommandTimeoutException.class,
() -> cluster.withCluster(connection -> connection.sync().blpop(2 * TIMEOUT.toMillis() / 1000d, "key"))); () -> cluster.withCluster(connection -> connection.sync().blpop(10 * TIMEOUT.toMillis() / 1000d, "key")));
} }
@Test @Test