Skip to content

Commit a31abea

Browse files
committed
test: fix deprecation test
1 parent c182aa0 commit a31abea

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

integration-tests/src/test/java/com/datastax/oss/driver/querybuilder/RelationOptionsIT.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,16 +113,18 @@ public void should_create_table_with_chunk_length_in_kb() {
113113
@Test
114114
@BackendRequirement(
115115
type = BackendType.CASSANDRA,
116+
minInclusive = "3.0",
116117
maxExclusive = "5.0",
117-
description = "chunk_length_kb was renamed to chunk_length_in_kb in Cassandra 5.0")
118+
description =
119+
"Deprecated compression options should still work with Cassandra >= 3.0 & < 5.0")
118120
public void should_create_table_with_deprecated_options() {
119121
try (CqlSession session = session()) {
120122
session.execute(
121123
SchemaBuilder.createTable("relation_options")
122124
.withPartitionKey("id", DataTypes.INT)
123125
.withColumn("name", DataTypes.TEXT)
124126
.withColumn("age", DataTypes.INT)
125-
.withLZ4Compression(4096, 1.0)
127+
.withLZ4Compression(4096, 0.8)
126128
.build());
127129
KeyspaceMetadata keyspaceMetadata =
128130
session
@@ -133,8 +135,8 @@ public void should_create_table_with_deprecated_options() {
133135

134136
assertThat(describeOutput)
135137
.contains("'class':'org.apache.cassandra.io.compress.LZ4Compressor'");
136-
assertThat(describeOutput).contains("'chunk_length_kb':'4096'");
137-
assertThat(describeOutput).contains("'crc_check_chance':'0.8'");
138+
assertThat(describeOutput).contains("'chunk_length_in_kb':'4096'");
139+
assertThat(describeOutput).contains("crc_check_chance = 0.8");
138140
}
139141
}
140142

0 commit comments

Comments
 (0)