Skip to content

Commit b3d9377

Browse files
Bouncheckavelanarius
authored andcommitted
Fix ScyllaSniProxyTest
Removes checks related to Hosts listen address. Currently in a multi node scenario only the first node will have its listen address updated. It used to be the case that Host objects corresponding to all discovered hosts would report the listen address of the first node. Now no matter the amount of refreshes it's null for other nodes.
1 parent db9440f commit b3d9377

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
import com.datastax.driver.core.utils.ScyllaOnly;
1414
import java.util.ArrayList;
1515
import java.util.Collection;
16+
import java.util.Set;
17+
import java.util.TreeSet;
18+
import java.util.UUID;
1619
import org.testng.annotations.Test;
1720

1821
@CreateCCM(CreateCCM.TestMode.PER_METHOD)
@@ -27,13 +30,14 @@ private void test_ccm_cluster(int testNodes) {
2730

2831
Collection<Host> hosts = s.getState().getConnectedHosts();
2932
assertThat(hosts.size()).isEqualTo(testNodes);
33+
Set<UUID> uuidSet = new TreeSet<UUID>();
3034
for (Host host : hosts) {
31-
assertThat(host.getListenAddress()).isNotNull();
32-
assertThat(host.getListenAddress()).isEqualTo(TestUtils.addressOfNode(1));
35+
uuidSet.add(host.getHostId());
3336
assertThat(host.getEndPoint().resolve().getAddress()).isEqualTo(TestUtils.addressOfNode(1));
3437
assertThat(host.getEndPoint().resolve().getPort()).isEqualTo(ccm().getSniPort());
3538
assertThat(host.getEndPoint().toString()).doesNotContain("any.");
3639
}
40+
assertThat(uuidSet.size()).isEqualTo(testNodes);
3741
((SessionManager) s).cluster.manager.controlConnection.triggerReconnect();
3842

3943
SchemaChangeListener listener = mock(SchemaChangeListenerBase.class);

0 commit comments

Comments
 (0)