|
16 | 16 | package com.datastax.driver.core;
|
17 | 17 |
|
18 | 18 | import static com.datastax.driver.core.ProtocolVersion.V1;
|
19 |
| -import static com.datastax.driver.core.ProtocolVersion.V4; |
| 19 | +import static com.datastax.driver.core.ProtocolVersion.V5; |
20 | 20 | import static com.datastax.driver.core.ProtocolVersion.V6;
|
21 | 21 | import static org.assertj.core.api.Assertions.assertThat;
|
22 | 22 |
|
@@ -55,13 +55,14 @@ public void should_fail_when_version_provided_and_too_low_3_8_plus() throws Exce
|
55 | 55 | /** @jira_ticket JAVA-1367 */
|
56 | 56 | @Test(groups = "short")
|
57 | 57 | public void should_fail_when_version_provided_and_too_high() throws Exception {
|
58 |
| - if (ccm().getCassandraVersion().compareTo(VersionNumber.parse("2.2")) >= 0) { |
59 |
| - throw new SkipException("Server supports protocol V4"); |
| 58 | + if (ccm().getCassandraVersion().compareTo(VersionNumber.parse("3.10")) >= 0) { |
| 59 | + throw new SkipException("Server supports protocol V5"); |
60 | 60 | }
|
61 |
| - UnsupportedProtocolVersionException e = connectWithUnsupportedVersion(V4); |
62 |
| - assertThat(e.getUnsupportedVersion()).isEqualTo(V4); |
63 |
| - // pre-CASSANDRA-11464: server replies with its own version |
64 |
| - assertThat(e.getServerVersion()).isEqualTo(protocolVersion); |
| 61 | + UnsupportedProtocolVersionException e = connectWithUnsupportedVersion(V5); |
| 62 | + assertThat(e.getUnsupportedVersion()).isEqualTo(V5); |
| 63 | + // see CASSANDRA-11464: for C* < 3.0.9 and 3.8, server replies with its own version; |
| 64 | + // otherwise it replies with the client's version. |
| 65 | + assertThat(e.getServerVersion()).isIn(V5, protocolVersion); |
65 | 66 | }
|
66 | 67 |
|
67 | 68 | /** @jira_ticket JAVA-1367 */
|
|
0 commit comments