Skip to content

Commit 3ffa863

Browse files
committed
Fix should_wait_for_each_contact_point_at_most_once for 2.1+.
1 parent b4d397c commit 3ffa863

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

driver-core/src/test/java/com/datastax/driver/core/ClusterInitTest.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,7 @@ public void should_wait_for_each_contact_point_at_most_once() {
9292

9393
// We have one live host so 2 successful connections (1 control connection and 1 core connection in the pool).
9494
// The other 5 hosts are unreachable, we should attempt to connect to each of them only once.
95-
int coreConnections = cluster.getConfiguration()
96-
.getPoolingOptions()
97-
.getCoreConnectionsPerHost(HostDistance.LOCAL);
98-
verify(socketOptions, times(1 + coreConnections + 5)).getKeepAlive();
95+
verify(socketOptions, times(1 + TestUtils.numberOfLocalCoreConnections(cluster) + 5)).getKeepAlive();
9996
} finally {
10097
if (cluster != null)
10198
cluster.close();

0 commit comments

Comments
 (0)