/** @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); }
/** @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); }
/** @jira_ticket JAVA-1367 */ @Test(groups = "short") @DseVersion("5.1.0") public void should_fail_when_version_provided_and_too_low() 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); }
controlConnection.connect(); } catch (UnsupportedProtocolVersionException e) { logger.debug("Cannot connect with protocol {}, trying {}", e.getUnsupportedVersion(), e.getServerVersion()); connectionFactory.protocolVersion = e.getServerVersion(); try { controlConnection.connect();
controlConnection.connect(); } catch (UnsupportedProtocolVersionException e) { logger.debug("Cannot connect with protocol {}, trying {}", e.getUnsupportedVersion(), e.getServerVersion()); connectionFactory.protocolVersion = e.getServerVersion(); try { controlConnection.connect();