use of com.datastax.driver.core.exceptions.UnsupportedProtocolVersionException in project java-driver by datastax.
the class ProtocolVersionRenegotiationTest method should_fail_when_beta_allowed_and_too_high.
/**
* @jira_ticket JAVA-1367
*/
@Test(groups = "short")
public void should_fail_when_beta_allowed_and_too_high() throws Exception {
if (ccm().getCassandraVersion().compareTo(VersionNumber.parse("3.10")) >= 0) {
throw new SkipException("Server supports protocol protocol V5 beta");
}
UnsupportedProtocolVersionException e = connectWithUnsupportedBetaVersion();
assertThat(e.getUnsupportedVersion()).isEqualTo(V5);
}
use of com.datastax.driver.core.exceptions.UnsupportedProtocolVersionException in project java-driver by datastax.
the class ProtocolVersionRenegotiationTest method should_fail_when_version_provided_and_too_low_3_8_plus.
/**
* @jira_ticket JAVA-1367
*/
@Test(groups = "short")
@CassandraVersion("3.8")
public void should_fail_when_version_provided_and_too_low_3_8_plus() throws Exception {
UnsupportedProtocolVersionException e = connectWithUnsupportedVersion(V1);
assertThat(e.getUnsupportedVersion()).isEqualTo(V1);
// post-CASSANDRA-11464: server replies with client's version
assertThat(e.getServerVersion()).isEqualTo(V1);
}
use of com.datastax.driver.core.exceptions.UnsupportedProtocolVersionException in project java-driver by datastax.
the class ProtocolVersionRenegotiationTest method should_fail_when_version_provided_and_too_high.
/**
* @jira_ticket JAVA-1367
*/
@Test(groups = "short")
public void should_fail_when_version_provided_and_too_high() throws Exception {
if (ccm().getCassandraVersion().compareTo(VersionNumber.parse("2.2")) >= 0) {
throw new SkipException("Server supports protocol V4");
}
UnsupportedProtocolVersionException e = connectWithUnsupportedVersion(V4);
assertThat(e.getUnsupportedVersion()).isEqualTo(V4);
// pre-CASSANDRA-11464: server replies with its own version
assertThat(e.getServerVersion()).isEqualTo(protocolVersion);
}
Aggregations