use of com.datastax.oss.simulacron.server.BoundNode in project java-driver by datastax.
the class ProtocolVersionMixedClusterIT method should_fail_if_peer_does_not_support_v3.
@Test
public void should_fail_if_peer_does_not_support_v3() {
Throwable t = catchThrowable(() -> {
try (BoundCluster simulacron = mixedVersions("3.0.0", "2.0.9", "3.11");
BoundNode contactPoint = simulacron.node(0);
CqlSession ignored = (CqlSession) SessionUtils.baseBuilder().addContactPoint(contactPoint.inetSocketAddress()).build()) {
fail("Cluster init should have failed");
}
});
assertThat(t).isInstanceOf(UnsupportedProtocolVersionException.class).hasMessageContaining("reports Cassandra version 2.0.9, but the driver only supports 2.1.0 and above");
}
Aggregations