|
24 | 24 | import com.datastax.dse.driver.api.mapper.reactive.MappedReactiveResultSet;
|
25 | 25 | import com.datastax.oss.driver.api.core.CqlIdentifier;
|
26 | 26 | import com.datastax.oss.driver.api.core.CqlSession;
|
| 27 | +import com.datastax.oss.driver.api.core.Version; |
27 | 28 | import com.datastax.oss.driver.api.core.cql.SimpleStatement;
|
28 | 29 | import com.datastax.oss.driver.api.mapper.annotations.Dao;
|
29 | 30 | import com.datastax.oss.driver.api.mapper.annotations.DaoFactory;
|
|
34 | 35 | import com.datastax.oss.driver.api.mapper.annotations.Mapper;
|
35 | 36 | import com.datastax.oss.driver.api.mapper.annotations.Select;
|
36 | 37 | import com.datastax.oss.driver.api.mapper.entity.saving.NullSavingStrategy;
|
| 38 | +import com.datastax.oss.driver.api.testinfra.ccm.CcmBridge; |
37 | 39 | 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; |
40 | 40 | import com.datastax.oss.driver.api.testinfra.session.SessionRule;
|
41 | 41 | import io.reactivex.Flowable;
|
42 | 42 | import java.util.UUID;
|
|
48 | 48 | import org.junit.rules.TestRule;
|
49 | 49 |
|
50 | 50 | // 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.") |
54 | 51 | public class DeleteReactiveIT extends InventoryITBase {
|
55 | 52 |
|
56 |
| - private static CustomCcmRule ccmRule = |
57 |
| - CustomCcmRule.builder().withCassandraConfiguration("enable_sasi_indexes", "true").build(); |
| 53 | + private static CustomCcmRule ccmRule = configureCcm(CustomCcmRule.builder()).build(); |
58 | 54 |
|
59 | 55 | private static SessionRule<CqlSession> sessionRule = SessionRule.builder(ccmRule).build();
|
60 | 56 |
|
61 | 57 | @ClassRule public static TestRule chain = RuleChain.outerRule(ccmRule).around(sessionRule);
|
62 | 58 |
|
| 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 | + |
63 | 67 | private static DseProductDao dao;
|
64 | 68 |
|
65 | 69 | @BeforeClass
|
|
0 commit comments