Skip to content

Commit 3ac707f

Browse files
Bouncheckavelanarius
authored andcommitted
Return correct node address for scylla-jmx during testing.
Stick to "localhost" for Cassandra.
1 parent 0c8957f commit 3ac707f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,11 @@ public InetSocketAddress addressOfNode(int n) {
437437

438438
@Override
439439
public InetSocketAddress jmxAddressOfNode(int n) {
440-
return new InetSocketAddress("localhost", jmxPorts[n - 1]);
440+
if (GLOBAL_SCYLLA_VERSION_NUMBER != null) {
441+
return new InetSocketAddress(ipOfNode(n), jmxPorts[n - 1]);
442+
} else {
443+
return new InetSocketAddress("localhost", jmxPorts[n - 1]);
444+
}
441445
}
442446

443447
@Override

0 commit comments

Comments
 (0)