Skip to content

Commit 6b7fb6f

Browse files
authored
Integration CCMBridge and HostConnectionPoolTest fixes from driver matrix (#487)
1 parent 5ef21c8 commit 6b7fb6f

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1348,6 +1348,9 @@ private String joinJvmArgs() {
13481348
String quote = isWindows() ? "\"" : "";
13491349
for (String jvmArg : jvmArgs) {
13501350
// Windows requires jvm arguments to be quoted, while *nix requires unquoted.
1351+
if (scylla && jvmArg.startsWith("-Dcassandra")) {
1352+
continue;
1353+
}
13511354
allJvmArgs.append(" ");
13521355
allJvmArgs.append(quote);
13531356
allJvmArgs.append("--jvm_arg=");

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ public void should_resurrect_trashed_connection_within_idle_timeout() throws Exc
597597
allRequests.addAll(requests);
598598
allRequests.add(MockRequest.send(pool));
599599

600-
verify(factory, after(2000).times(1)).open(any(HostConnectionPool.class));
600+
verify(factory, after(2000).times(1)).open(any(HostConnectionPool.class), anyInt(), anyInt());
601601
assertPoolSize(pool, 2);
602602
Connection connection2 = pool.connections[0].get(1);
603603

@@ -625,7 +625,7 @@ public void should_resurrect_trashed_connection_within_idle_timeout() throws Exc
625625

626626
// Borrowing one more time should resurrect the trashed connection
627627
allRequests.addAll(MockRequest.sendMany(1, pool));
628-
verify(factory, after(2000).times(1)).open(any(HostConnectionPool.class));
628+
verify(factory, after(2000).times(1)).open(any(HostConnectionPool.class), anyInt(), anyInt());
629629
assertPoolSize(pool, 2);
630630

631631
assertThat(pool.connections[0]).containsExactly(connection2, connection1);
@@ -664,7 +664,7 @@ public void should_not_resurrect_trashed_connection_after_idle_timeout() throws
664664
allRequests.addAll(requests);
665665
allRequests.add(MockRequest.send(pool));
666666

667-
verify(factory, after(2000).times(1)).open(any(HostConnectionPool.class));
667+
verify(factory, after(2000).times(1)).open(any(HostConnectionPool.class), anyInt(), anyInt());
668668
assertPoolSize(pool, 2);
669669
reset(factory);
670670
Connection connection2 = pool.connections[0].get(1);
@@ -699,7 +699,7 @@ public void should_not_resurrect_trashed_connection_after_idle_timeout() throws
699699
allRequests.addAll(requests);
700700
allRequests.add(MockRequest.send(pool));
701701
assertThat(connection2.inFlight.get()).isEqualTo(101);
702-
verify(factory, after(2000).times(1)).open(any(HostConnectionPool.class));
702+
verify(factory, after(2000).times(1)).open(any(HostConnectionPool.class), anyInt(), anyInt());
703703
assertPoolSize(pool, 2);
704704

705705
// Borrow again to get the new connection
@@ -742,7 +742,7 @@ public void should_not_close_trashed_connection_until_no_in_flight() throws Exce
742742
allRequests.addAll(requests);
743743
allRequests.add(MockRequest.send(pool));
744744

745-
verify(factory, after(2000).times(1)).open(any(HostConnectionPool.class));
745+
verify(factory, after(2000).times(1)).open(any(HostConnectionPool.class), anyInt(), anyInt());
746746
assertThat(pool.connections[0]).hasSize(2);
747747

748748
// Return enough times to get back under the threshold where one connection is enough

0 commit comments

Comments
 (0)