diff --git a/atlasdb-cassandra/src/test/java/com/palantir/atlasdb/keyvalue/cassandra/CassandraClientPoolTest.java b/atlasdb-cassandra/src/test/java/com/palantir/atlasdb/keyvalue/cassandra/CassandraClientPoolTest.java index bc7d079124f..50f39fac79e 100644 --- a/atlasdb-cassandra/src/test/java/com/palantir/atlasdb/keyvalue/cassandra/CassandraClientPoolTest.java +++ b/atlasdb-cassandra/src/test/java/com/palantir/atlasdb/keyvalue/cassandra/CassandraClientPoolTest.java @@ -264,8 +264,10 @@ public void successfulRequestCausesHostToBeRemovedFromBlacklist() { @Test public void resilientToRollingRestarts() { - CassandraClientPool cassandraClientPool = - clientPoolWithServersInCurrentPool(ImmutableSet.of(CASS_SERVER_1, CASS_SERVER_2)); + when(config.autoRefreshNodes()).thenReturn(false); + CassandraClientPool cassandraClientPool = clientPoolWithServersInConfigAndCurrentPool( + Set.of(HOST_1, HOST_2), ImmutableSet.of(CASS_SERVER_1, CASS_SERVER_2)); + AtomicReference downHost = new AtomicReference<>(CASS_SERVER_1); cassandraClientPool .getCurrentPools() @@ -643,6 +645,11 @@ private CassandraClientPoolImpl clientPoolWithInitialProxies(Set addresses, Set servers) { + return clientPoolWith(addresses, servers, Optional.empty()); + } + private CassandraClientPoolImpl clientPoolWithServersInCurrentPool(Set servers) { return clientPoolWith(ImmutableSet.of(), servers, Optional.empty()); } diff --git a/changelog/@unreleased/pr-7036.v2.yml b/changelog/@unreleased/pr-7036.v2.yml new file mode 100644 index 00000000000..f68876e7bdb --- /dev/null +++ b/changelog/@unreleased/pr-7036.v2.yml @@ -0,0 +1,6 @@ +type: improvement +improvement: + description: CassandraClientPoolTest resilientToRollingRestarts() method shouldn't + be flaky anymore. + links: + - https://github.com/palantir/atlasdb/pull/7036