Skip to content

Commit e4bafce

Browse files
CASSANDRA-19635 - Run integration tests with C* 5.x
1 parent 19983b3 commit e4bafce

File tree

2 files changed

+18
-14
lines changed

2 files changed

+18
-14
lines changed

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -254,33 +254,32 @@ public void should_get_virtual_metadata() {
254254
+ " unit text,\n"
255255
+ " PRIMARY KEY (keyspace_name, table_name, task_id)\n"
256256
+ "); */",
257-
// Cassandra 5.0
257+
// Cassandra 4.0
258258
"/* VIRTUAL TABLE system_views.sstable_tasks (\n"
259259
+ " keyspace_name text,\n"
260260
+ " table_name text,\n"
261-
+ " task_id timeuuid,\n"
261+
+ " task_id uuid,\n"
262262
+ " completion_ratio double,\n"
263263
+ " kind text,\n"
264264
+ " progress bigint,\n"
265-
+ " sstables int,\n"
266-
+ " target_directory text,\n"
267265
+ " total bigint,\n"
268266
+ " unit text,\n"
269267
+ " PRIMARY KEY (keyspace_name, table_name, task_id)\n"
270268
+ "); */",
271-
// Cassandra 4.0
269+
// Cassandra 4.1
272270
"/* VIRTUAL TABLE system_views.sstable_tasks (\n"
273271
+ " keyspace_name text,\n"
274272
+ " table_name text,\n"
275-
+ " task_id uuid,\n"
273+
+ " task_id timeuuid,\n"
276274
+ " completion_ratio double,\n"
277275
+ " kind text,\n"
278276
+ " progress bigint,\n"
277+
+ " sstables int,\n"
279278
+ " total bigint,\n"
280279
+ " unit text,\n"
281280
+ " PRIMARY KEY (keyspace_name, table_name, task_id)\n"
282281
+ "); */",
283-
// Cassandra 4.1
282+
// Cassandra 5.0
284283
"/* VIRTUAL TABLE system_views.sstable_tasks (\n"
285284
+ " keyspace_name text,\n"
286285
+ " table_name text,\n"
@@ -289,6 +288,7 @@ public void should_get_virtual_metadata() {
289288
+ " kind text,\n"
290289
+ " progress bigint,\n"
291290
+ " sstables int,\n"
291+
+ " target_directory text,\n"
292292
+ " total bigint,\n"
293293
+ " unit text,\n"
294294
+ " PRIMARY KEY (keyspace_name, table_name, task_id)\n"

integration-tests/src/test/java/com/datastax/oss/driver/mapper/DeleteReactiveIT.java

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import com.datastax.dse.driver.api.mapper.reactive.MappedReactiveResultSet;
2525
import com.datastax.oss.driver.api.core.CqlIdentifier;
2626
import com.datastax.oss.driver.api.core.CqlSession;
27+
import com.datastax.oss.driver.api.core.Version;
2728
import com.datastax.oss.driver.api.core.cql.SimpleStatement;
2829
import com.datastax.oss.driver.api.mapper.annotations.Dao;
2930
import com.datastax.oss.driver.api.mapper.annotations.DaoFactory;
@@ -34,9 +35,8 @@
3435
import com.datastax.oss.driver.api.mapper.annotations.Mapper;
3536
import com.datastax.oss.driver.api.mapper.annotations.Select;
3637
import com.datastax.oss.driver.api.mapper.entity.saving.NullSavingStrategy;
38+
import com.datastax.oss.driver.api.testinfra.ccm.CcmBridge;
3739
import com.datastax.oss.driver.api.testinfra.ccm.CustomCcmRule;
38-
import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
39-
import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
4040
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
4141
import io.reactivex.Flowable;
4242
import java.util.UUID;
@@ -48,18 +48,22 @@
4848
import org.junit.rules.TestRule;
4949

5050
// Do not run LWT tests in parallel because they may interfere. Tests operate on the same row.
51-
@BackendRequirement(
52-
type = BackendType.CASSANDRA,
53-
description = "SASI indexes broken in DSE. See InventoryITBase#BROKEN_SASI_VERSION.")
5451
public class DeleteReactiveIT extends InventoryITBase {
5552

56-
private static CustomCcmRule ccmRule =
57-
CustomCcmRule.builder().withCassandraConfiguration("enable_sasi_indexes", "true").build();
53+
private static CustomCcmRule ccmRule = configureCcm(CustomCcmRule.builder()).build();
5854

5955
private static SessionRule<CqlSession> sessionRule = SessionRule.builder(ccmRule).build();
6056

6157
@ClassRule public static TestRule chain = RuleChain.outerRule(ccmRule).around(sessionRule);
6258

59+
private static CustomCcmRule.Builder configureCcm(CustomCcmRule.Builder builder) {
60+
if (!CcmBridge.DSE_ENABLEMENT
61+
&& CcmBridge.VERSION.nextStable().compareTo(Version.V4_0_0) >= 0) {
62+
builder.withCassandraConfiguration("enable_sasi_indexes", true);
63+
}
64+
return builder;
65+
}
66+
6367
private static DseProductDao dao;
6468

6569
@BeforeClass

0 commit comments

Comments
 (0)