Skip to content

Commit 5f7b7fa

Browse files
committed
Fix ProtocolVersionInitialNegotiationIT for C* 4.0-rc1
1 parent 7dca8e4 commit 5f7b7fa

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

integration-tests/src/test/java/com/datastax/oss/driver/core/ProtocolVersionInitialNegotiationIT.java

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ public void should_downgrade_to_v3_dse() {
6666

6767
@CassandraRequirement(
6868
min = "2.2",
69-
max = "4.0",
70-
description = "Only C* in [2.2,4.0[ has V4 as its highest version")
69+
max = "4.0-rc1",
70+
description = "Only C* in [2.2,4.0-rc1[ has V4 as its highest version")
7171
@Test
7272
public void should_downgrade_to_v4_oss() {
7373
Assume.assumeFalse("This test is only for OSS C*", ccm.getDseVersion().isPresent());
@@ -77,6 +77,18 @@ public void should_downgrade_to_v4_oss() {
7777
}
7878
}
7979

80+
@CassandraRequirement(
81+
min = "4.0-rc1",
82+
description = "Only C* in [4.0-rc1,*[ has V5 as its highest version")
83+
@Test
84+
public void should_downgrade_to_v5_oss() {
85+
Assume.assumeFalse("This test is only for OSS C*", ccm.getDseVersion().isPresent());
86+
try (CqlSession session = SessionUtils.newSession(ccm)) {
87+
assertThat(session.getContext().getProtocolVersion().getCode()).isEqualTo(5);
88+
session.execute("select * from system.local");
89+
}
90+
}
91+
8092
@DseRequirement(
8193
min = "5.0",
8294
max = "5.1",
@@ -142,8 +154,8 @@ public void should_fail_if_provided_v4_is_not_supported_dse() {
142154

143155
@CassandraRequirement(
144156
min = "2.1",
145-
max = "4.0",
146-
description = "Only C* in [2.1,4.0[ has V5 unsupported or supported as beta")
157+
max = "4.0-rc1",
158+
description = "Only C* in [2.1,4.0-rc1[ has V5 unsupported or supported as beta")
147159
@Test
148160
public void should_fail_if_provided_v5_is_not_supported_oss() {
149161
Assume.assumeFalse("This test is only for OSS C*", ccm.getDseVersion().isPresent());

0 commit comments

Comments
 (0)