From cae06c5baa5b3b928bed4fca5ea37d24d0ecc23b Mon Sep 17 00:00:00 2001 From: Ekaterina Dimitrova Date: Wed, 6 Apr 2022 17:42:05 -0400 Subject: [PATCH 1/2] Set Constants.KEY_DTEST_API_CONFIG_CHECK=true by default for in-jvm upgrade tests CASSANDRA-17532 --- .../distributed/UpgradeableCluster.java | 1 - .../CompactStorage3to4UpgradeTest.java | 7 +++++- .../upgrade/CompactStorageUpgradeTest.java | 23 ++++++++++++++++++- .../distributed/upgrade/GroupByTest.java | 8 ++++--- .../MixedModeAvailabilityTestBase.java | 6 ++++- .../upgrade/MixedModeAvailabilityV3XTest.java | 2 -- .../upgrade/MixedModeBatchTestBase.java | 5 ++++ .../upgrade/MixedModeConsistencyTestBase.java | 6 ++++- .../upgrade/MixedModeConsistencyV30Test.java | 2 -- .../upgrade/MixedModeConsistencyV3XTest.java | 2 -- .../upgrade/MixedModeGossipTest.java | 11 +++++++-- .../upgrade/MixedModeMessageForwardTest.java | 7 +++++- .../MixedModeReadRepairDeleteTest.java | 9 ++++++++ .../upgrade/MixedModeReadRepairWriteTest.java | 9 ++++++++ .../upgrade/MixedModeReadTest.java | 7 ++++-- .../upgrade/MixedModeRepairTest.java | 6 ++++- .../upgrade/MixedModeReplicationTestBase.java | 5 ++++ .../distributed/upgrade/PagingTest.java | 7 ++++-- .../upgrade/Pre40MessageFilterTest.java | 13 ++++++++--- .../ReadRepairCompactStorageUpgradeTest.java | 5 ++++ .../distributed/upgrade/UpgradeTest.java | 8 +++++-- 21 files changed, 122 insertions(+), 27 deletions(-) diff --git a/test/distributed/org/apache/cassandra/distributed/UpgradeableCluster.java b/test/distributed/org/apache/cassandra/distributed/UpgradeableCluster.java index 7a4d2bb6c2c5..3e9cd36281e6 100644 --- a/test/distributed/org/apache/cassandra/distributed/UpgradeableCluster.java +++ b/test/distributed/org/apache/cassandra/distributed/UpgradeableCluster.java @@ -42,7 +42,6 @@ private UpgradeableCluster(Builder builder) protected IUpgradeableInstance newInstanceWrapper(int generation, Versions.Version version, IInstanceConfig config) { - config.set(Constants.KEY_DTEST_API_CONFIG_CHECK, false); return new Wrapper(generation, version, config); } diff --git a/test/distributed/org/apache/cassandra/distributed/upgrade/CompactStorage3to4UpgradeTest.java b/test/distributed/org/apache/cassandra/distributed/upgrade/CompactStorage3to4UpgradeTest.java index 08c4c99ec714..036424cabf8c 100644 --- a/test/distributed/org/apache/cassandra/distributed/upgrade/CompactStorage3to4UpgradeTest.java +++ b/test/distributed/org/apache/cassandra/distributed/upgrade/CompactStorage3to4UpgradeTest.java @@ -20,6 +20,7 @@ import org.junit.Test; +import org.apache.cassandra.distributed.Constants; import org.apache.cassandra.distributed.shared.Versions; import static org.apache.cassandra.distributed.api.Feature.GOSSIP; @@ -36,7 +37,11 @@ public void testNullClusteringValues() throws Throwable { new TestCase().nodes(1) .upgradesFrom(v30) - .withConfig(config -> config.with(GOSSIP, NETWORK, NATIVE_PROTOCOL).set("enable_drop_compact_storage", true)) + .withConfig(config -> config.with(GOSSIP, NETWORK, NATIVE_PROTOCOL) + .set("enable_drop_compact_storage", true) + // below property is conciesly set to false as we have new config in the next version + // that doesn't exist in the earlier one; we want to ignore it. (CASSANDRA-17532) + .set(Constants.KEY_DTEST_API_CONFIG_CHECK, false)) .setup(cluster -> { String create = "CREATE TABLE %s.%s(k int, c1 int, c2 int, v int, PRIMARY KEY (k, c1, c2)) " + "WITH compaction = { 'class':'LeveledCompactionStrategy', 'enabled':'false'} AND COMPACT STORAGE"; diff --git a/test/distributed/org/apache/cassandra/distributed/upgrade/CompactStorageUpgradeTest.java b/test/distributed/org/apache/cassandra/distributed/upgrade/CompactStorageUpgradeTest.java index 9e689346ce5f..1a0dd2ae73cf 100644 --- a/test/distributed/org/apache/cassandra/distributed/upgrade/CompactStorageUpgradeTest.java +++ b/test/distributed/org/apache/cassandra/distributed/upgrade/CompactStorageUpgradeTest.java @@ -23,6 +23,7 @@ import org.junit.Assert; import org.junit.Test; +import org.apache.cassandra.distributed.Constants; import org.apache.cassandra.distributed.api.ConsistencyLevel; import static org.apache.cassandra.distributed.api.Feature.GOSSIP; import static org.apache.cassandra.distributed.api.Feature.NETWORK; @@ -38,6 +39,10 @@ public void compactStorageColumnDeleteTest() throws Throwable .nodes(2) .nodesToUpgrade(2) .upgradesFrom(v30) + .withConfig(config -> config + // below property is conciesly set to false as we have new config in the next version + // that doesn't exist in the earlier one; we want to ignore it. (CASSANDRA-17532) + .set(Constants.KEY_DTEST_API_CONFIG_CHECK, false)) .setup((cluster) -> { cluster.schemaChange("CREATE TABLE " + KEYSPACE + ".tbl (pk int, ck int, v int, PRIMARY KEY (pk, ck)) WITH COMPACT STORAGE"); }) @@ -69,6 +74,10 @@ public void compactStoragePagingTest() throws Throwable .nodes(2) .nodesToUpgrade(2) .upgradesFrom(v30) + .withConfig(config -> config + // below property is conciesly set to false as we have new config in the next version + // that doesn't exist in the earlier one; we want to ignore it. (CASSANDRA-17532) + .set(Constants.KEY_DTEST_API_CONFIG_CHECK, false)) .setup((cluster) -> { cluster.schemaChange("CREATE TABLE " + KEYSPACE + ".tbl (pk int, ck int, v int, PRIMARY KEY (pk, ck)) WITH COMPACT STORAGE"); for (int i = 1; i < 10; i++) @@ -95,6 +104,10 @@ public void compactStorageImplicitNullInClusteringTest() throws Throwable .nodes(2) .nodesToUpgrade(2) .upgradesFrom(v30) + .withConfig(config -> config + // below property is conciesly set to false as we have new config in the next version + // that doesn't exist in the earlier one; we want to ignore it. (CASSANDRA-17532) + .set(Constants.KEY_DTEST_API_CONFIG_CHECK, false)) .setup((cluster) -> { cluster.schemaChange("CREATE TABLE " + KEYSPACE + ".tbl (pk int, ck1 int, ck2 int, v int, PRIMARY KEY (pk, ck1, ck2)) WITH COMPACT STORAGE"); }) @@ -114,6 +127,10 @@ public void compactStorageHiddenColumnTest() throws Throwable .nodes(2) .nodesToUpgrade(2) .upgradesFrom(v30) + .withConfig(config -> config + // below property is conciesly set to false as we have new config in the next version + // that doesn't exist in the earlier one; we want to ignore it. (CASSANDRA-17532) + .set(Constants.KEY_DTEST_API_CONFIG_CHECK, false)) .setup((cluster) -> { cluster.schemaChange("CREATE TABLE " + KEYSPACE + ".tbl (pk int, ck int, PRIMARY KEY (pk, ck)) WITH COMPACT STORAGE"); }) @@ -146,7 +163,11 @@ public void compactStorageUpgradeTest() throws Throwable .nodes(2) .nodesToUpgrade(1, 2) .upgradesFrom(v30) - .withConfig(config -> config.with(GOSSIP, NETWORK).set("enable_drop_compact_storage", true)) + .withConfig(config -> config.with(GOSSIP, NETWORK) + .set("enable_drop_compact_storage", true) + // below property is conciesly set to false as we have new config in the next version + // that doesn't exist in the earlier one; we want to ignore it. (CASSANDRA-17532) + .set(Constants.KEY_DTEST_API_CONFIG_CHECK, false)) .setup((cluster) -> { cluster.schemaChange("CREATE TABLE " + KEYSPACE + ".tbl (pk int, ck int, PRIMARY KEY (pk, ck)) WITH COMPACT STORAGE"); cluster.coordinator(1).execute("INSERT INTO " + KEYSPACE + ".tbl (pk, ck) VALUES (1,1)", ConsistencyLevel.ALL); diff --git a/test/distributed/org/apache/cassandra/distributed/upgrade/GroupByTest.java b/test/distributed/org/apache/cassandra/distributed/upgrade/GroupByTest.java index 2e6749742f18..7c0d32493e72 100644 --- a/test/distributed/org/apache/cassandra/distributed/upgrade/GroupByTest.java +++ b/test/distributed/org/apache/cassandra/distributed/upgrade/GroupByTest.java @@ -20,11 +20,10 @@ import org.junit.Test; +import org.apache.cassandra.distributed.Constants; import org.apache.cassandra.distributed.api.ConsistencyLevel; -import org.apache.cassandra.distributed.shared.Versions; import static org.apache.cassandra.distributed.api.Feature.GOSSIP; -import static org.apache.cassandra.distributed.api.Feature.NATIVE_PROTOCOL; import static org.apache.cassandra.distributed.api.Feature.NETWORK; import static org.apache.cassandra.distributed.shared.AssertUtils.assertRows; import static org.apache.cassandra.distributed.shared.AssertUtils.row; @@ -39,7 +38,10 @@ public void testReads() throws Throwable .nodes(2) .upgradesFrom(v3X) .nodesToUpgrade(1) - .withConfig(config -> config.with(GOSSIP, NETWORK)) + .withConfig(config -> config.with(GOSSIP, NETWORK) + // below property is conciesly set to false as we have new config in the next version + // that doesn't exist in the earlier one; we want to ignore it. (CASSANDRA-17532) + .set(Constants.KEY_DTEST_API_CONFIG_CHECK, false)) .setup(cluster -> { cluster.schemaChange(withKeyspace("CREATE TABLE %s.t (a int, b int, c int, v int, primary key (a, b, c))")); String insert = withKeyspace("INSERT INTO %s.t (a, b, c, v) VALUES (?, ?, ?, ?)"); diff --git a/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeAvailabilityTestBase.java b/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeAvailabilityTestBase.java index c1ae15352557..725d864d1f96 100644 --- a/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeAvailabilityTestBase.java +++ b/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeAvailabilityTestBase.java @@ -24,6 +24,7 @@ import com.vdurmont.semver4j.Semver; +import org.apache.cassandra.distributed.Constants; import org.apache.cassandra.distributed.api.ConsistencyLevel; import org.apache.cassandra.distributed.api.ICoordinator; import org.apache.cassandra.exceptions.ReadTimeoutException; @@ -71,7 +72,10 @@ private static void testAvailability(boolean upgradedCoordinator, .nodesToUpgrade(upgradedCoordinator ? 1 : 2) .upgrades(initial, upgrade) .withConfig(config -> config.set("read_request_timeout_in_ms", SECONDS.toMillis(2)) - .set("write_request_timeout_in_ms", SECONDS.toMillis(2))) + .set("write_request_timeout_in_ms", SECONDS.toMillis(2)) + // below property is conciesly set to false as we have new config in the next version + // that doesn't exist in the earlier one; we want to ignore it. (CASSANDRA-17532) + .set(Constants.KEY_DTEST_API_CONFIG_CHECK, false)) .setup(c -> c.schemaChange(withKeyspace("CREATE TABLE %s.t (k uuid, c int, v int, PRIMARY KEY (k, c))"))) .runAfterNodeUpgrade((cluster, n) -> { diff --git a/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeAvailabilityV3XTest.java b/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeAvailabilityV3XTest.java index 70230f5f0ab8..cdd9915a5d73 100644 --- a/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeAvailabilityV3XTest.java +++ b/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeAvailabilityV3XTest.java @@ -20,8 +20,6 @@ import org.junit.Test; -import org.apache.cassandra.distributed.shared.Versions; - /** * {@link MixedModeAvailabilityTestBase} for upgrades from v3X. */ diff --git a/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeBatchTestBase.java b/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeBatchTestBase.java index 427eb613c0e3..c94d45b3ead1 100644 --- a/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeBatchTestBase.java +++ b/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeBatchTestBase.java @@ -23,6 +23,7 @@ import com.vdurmont.semver4j.Semver; +import org.apache.cassandra.distributed.Constants; import org.apache.cassandra.distributed.UpgradeableCluster; import org.apache.cassandra.distributed.api.ConsistencyLevel; import org.apache.cassandra.distributed.api.IMessageFilters; @@ -57,6 +58,10 @@ protected void testSimpleStrategy(Semver from, Semver to, boolean isLogged) thro .nodes(3) .nodesToUpgrade(1, 2) .upgrades(from, to) + .withConfig(config -> config + // below property is conciesly set to false as we have new config in the next version + // that doesn't exist in the earlier one; we want to ignore it. (CASSANDRA-17532) + .set(Constants.KEY_DTEST_API_CONFIG_CHECK, false)) .setup(cluster -> { cluster.schemaChange("CREATE KEYSPACE test_simple WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 2};"); cluster.schemaChange("CREATE TABLE test_simple.names (key int PRIMARY KEY, name text)"); diff --git a/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeConsistencyTestBase.java b/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeConsistencyTestBase.java index f98fc8a71b41..e853beed380d 100644 --- a/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeConsistencyTestBase.java +++ b/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeConsistencyTestBase.java @@ -26,6 +26,7 @@ import com.vdurmont.semver4j.Semver; +import org.apache.cassandra.distributed.Constants; import org.apache.cassandra.distributed.UpgradeableCluster; import org.apache.cassandra.distributed.api.ConsistencyLevel; import org.apache.cassandra.distributed.api.IUpgradeableInstance; @@ -57,7 +58,10 @@ protected static void testConsistency(Semver initial, Semver upgrade) throws Thr .nodesToUpgrade(1) .upgrades(initial, upgrade) .withConfig(config -> config.set("read_request_timeout_in_ms", SECONDS.toMillis(30)) - .set("write_request_timeout_in_ms", SECONDS.toMillis(30))) + .set("write_request_timeout_in_ms", SECONDS.toMillis(30)) + // below property is conciesly set to false as we have new config in the next version + // that doesn't exist in the earlier one; we want to ignore it. (CASSANDRA-17532) + .set(Constants.KEY_DTEST_API_CONFIG_CHECK, false)) .setup(cluster -> { Tester.createTable(cluster); for (Tester tester : testers) diff --git a/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeConsistencyV30Test.java b/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeConsistencyV30Test.java index 8687c55e1770..2712a46040af 100644 --- a/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeConsistencyV30Test.java +++ b/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeConsistencyV30Test.java @@ -20,8 +20,6 @@ import org.junit.Test; -import org.apache.cassandra.distributed.shared.Versions; - /** * {@link MixedModeConsistencyTestBase} for upgrades from v30. */ diff --git a/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeConsistencyV3XTest.java b/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeConsistencyV3XTest.java index 9e4ec6a70bb6..d39ea56039eb 100644 --- a/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeConsistencyV3XTest.java +++ b/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeConsistencyV3XTest.java @@ -20,8 +20,6 @@ import org.junit.Test; -import org.apache.cassandra.distributed.shared.Versions; - /** * {@link MixedModeConsistencyTestBase} for upgrades from v3X. */ diff --git a/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeGossipTest.java b/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeGossipTest.java index e706bda27272..7a45ea43c64a 100644 --- a/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeGossipTest.java +++ b/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeGossipTest.java @@ -30,6 +30,7 @@ import com.google.common.util.concurrent.Uninterruptibles; import org.junit.Test; +import org.apache.cassandra.distributed.Constants; import org.apache.cassandra.distributed.UpgradeableCluster; import org.apache.cassandra.distributed.api.Feature; import org.apache.cassandra.distributed.api.IMessageFilters; @@ -47,7 +48,10 @@ public class MixedModeGossipTest extends UpgradeTestBase public void testStatusFieldShouldExistInOldVersionNodes() throws Throwable { new TestCase() - .withConfig(c -> c.with(Feature.GOSSIP, Feature.NETWORK)) + .withConfig(c -> c.with(Feature.GOSSIP, Feature.NETWORK) + // below property is conciesly set to false as we have new config in the next version + // that doesn't exist in the earlier one; we want to ignore it. (CASSANDRA-17532) + .set(Constants.KEY_DTEST_API_CONFIG_CHECK, false)) .nodes(3) .nodesToUpgradeOrdered(1, 2, 3) // all upgrades from v30 up, excluding v30->v3X @@ -83,7 +87,10 @@ public void testStatusFieldShouldExistInOldVersionNodesEdgeCase() throws Throwab { AtomicReference n1GossipSynBlocker = new AtomicReference<>(); new TestCase() - .withConfig(c -> c.with(Feature.GOSSIP, Feature.NETWORK)) + .withConfig(c -> c.with(Feature.GOSSIP, Feature.NETWORK) + // below property is conciesly set to false as we have new config in the next version + // that doesn't exist in the earlier one; we want to ignore it. (CASSANDRA-17532) + .set(Constants.KEY_DTEST_API_CONFIG_CHECK, false)) .nodes(3) .nodesToUpgradeOrdered(1, 2, 3) // all upgrades from v30 up, excluding v30->v3X diff --git a/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeMessageForwardTest.java b/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeMessageForwardTest.java index 78e22195f05d..3968020648af 100644 --- a/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeMessageForwardTest.java +++ b/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeMessageForwardTest.java @@ -25,6 +25,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.apache.cassandra.distributed.Constants; import org.apache.cassandra.distributed.UpgradeableCluster; import org.apache.cassandra.distributed.api.ConsistencyLevel; import org.apache.cassandra.distributed.api.Feature; @@ -81,7 +82,11 @@ public void checkWritesForwardedToOtherDcTest() throws Throwable .collect(Collectors.joining(",")); new TestCase() - .withConfig(c -> c.with(Feature.GOSSIP, Feature.NETWORK).set("request_timeout_in_ms", 30000)) + .withConfig(c -> c.with(Feature.GOSSIP, Feature.NETWORK) + .set("request_timeout_in_ms", 30000) + // below property is conciesly set to false as we have new config in the next version + // that doesn't exist in the earlier one; we want to ignore it. (CASSANDRA-17532) + .set(Constants.KEY_DTEST_API_CONFIG_CHECK, false)) .withBuilder(b -> b.withRacks(numDCs, 1, nodesPerDc)) .nodes(numDCs * nodesPerDc) .singleUpgrade(v30, v40) diff --git a/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeReadRepairDeleteTest.java b/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeReadRepairDeleteTest.java index 01955c5672b4..d75a98d2b2e9 100644 --- a/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeReadRepairDeleteTest.java +++ b/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeReadRepairDeleteTest.java @@ -20,6 +20,7 @@ import org.junit.Test; +import org.apache.cassandra.distributed.Constants; import org.apache.cassandra.distributed.api.ConsistencyLevel; import static org.apache.cassandra.distributed.shared.AssertUtils.assertRows; @@ -44,6 +45,10 @@ public void mixedModeReadRepairDeleteRow() throws Throwable Object[] row2 = row(0, 2, 20, 8); allUpgrades(2, 1) + .withConfig(config -> config + // below property is conciesly set to false as we have new config in the next version + // that doesn't exist in the earlier one; we want to ignore it. (CASSANDRA-17532) + .set(Constants.KEY_DTEST_API_CONFIG_CHECK, false)) .setup(cluster -> { cluster.schemaChange(withKeyspace("CREATE TABLE %s.t (k int, c int, v int, s int static, PRIMARY KEY (k, c))")); @@ -83,6 +88,10 @@ public void mixedModeReadRepairDeletePartition() throws Throwable Object[][] partition2 = new Object[][]{ row(2, 1, 21, 20), row(2, 2, 22, 20) }; allUpgrades(2, 1) + .withConfig(config -> config + // below property is conciesly set to false as we have new config in the next version + // that doesn't exist in the earlier one; we want to ignore it. (CASSANDRA-17532) + .set(Constants.KEY_DTEST_API_CONFIG_CHECK, false)) .setup(cluster -> { cluster.schemaChange(withKeyspace("CREATE TABLE %s.t (k int, c int, v int, s int static, PRIMARY KEY (k, c))")); diff --git a/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeReadRepairWriteTest.java b/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeReadRepairWriteTest.java index 4e3074d67100..c4660f84802d 100644 --- a/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeReadRepairWriteTest.java +++ b/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeReadRepairWriteTest.java @@ -20,6 +20,7 @@ import org.junit.Test; +import org.apache.cassandra.distributed.Constants; import org.apache.cassandra.distributed.api.ConsistencyLevel; import static org.apache.cassandra.distributed.shared.AssertUtils.assertRows; @@ -44,6 +45,10 @@ public void mixedModeReadRepairInsert() throws Throwable Object[] row2 = row(0, 2, 20); allUpgrades(2, 1) + .withConfig(config -> config + // below property is conciesly set to false as we have new config in the next version + // that doesn't exist in the earlier one; we want to ignore it. (CASSANDRA-17532) + .set(Constants.KEY_DTEST_API_CONFIG_CHECK, false)) .setup(c -> c.schemaChange(withKeyspace("CREATE TABLE %s.t (k int, c int, v int, PRIMARY KEY (k, c))"))) .runAfterClusterUpgrade(cluster -> { @@ -75,6 +80,10 @@ public void mixedModeReadRepairUpdate() throws Throwable Object[] row2 = row(0, 2, 20); allUpgrades(2, 1) + .withConfig(config -> config + // below property is conciesly set to false as we have new config in the next version + // that doesn't exist in the earlier one; we want to ignore it. (CASSANDRA-17532) + .set(Constants.KEY_DTEST_API_CONFIG_CHECK, false)) .setup(cluster -> { cluster.schemaChange(withKeyspace("CREATE TABLE %s.t (k int, c int, v int, PRIMARY KEY (k, c))")); diff --git a/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeReadTest.java b/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeReadTest.java index c95aede5069f..fb5e2ab2907b 100644 --- a/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeReadTest.java +++ b/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeReadTest.java @@ -20,9 +20,9 @@ import org.junit.Test; +import org.apache.cassandra.distributed.Constants; import org.apache.cassandra.distributed.api.Feature; import org.apache.cassandra.distributed.api.IInvokableInstance; -import org.apache.cassandra.distributed.shared.Versions; import org.apache.cassandra.gms.Gossiper; import org.apache.cassandra.utils.CassandraVersion; @@ -36,7 +36,10 @@ public class MixedModeReadTest extends UpgradeTestBase public void mixedModeReadColumnSubsetDigestCheck() throws Throwable { new TestCase() - .withConfig(c -> c.with(Feature.GOSSIP, Feature.NETWORK)) + .withConfig(c -> c.with(Feature.GOSSIP, Feature.NETWORK) + // below property is conciesly set to false as we have new config in the next version + // that doesn't exist in the earlier one; we want to ignore it. (CASSANDRA-17532) + .set(Constants.KEY_DTEST_API_CONFIG_CHECK, false)) .nodes(2) .nodesToUpgrade(1) // all upgrades from v30 up, excluding v30->v3X diff --git a/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeRepairTest.java b/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeRepairTest.java index adcfd1ff96c6..ecb36885d0c1 100644 --- a/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeRepairTest.java +++ b/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeRepairTest.java @@ -27,6 +27,7 @@ import org.junit.Assert; import org.junit.Test; +import org.apache.cassandra.distributed.Constants; import org.apache.cassandra.distributed.UpgradeableCluster; import org.apache.cassandra.distributed.api.IUpgradeableInstance; @@ -55,7 +56,10 @@ public void testRepairDuringMajorUpgrade() throws Throwable .nodes(2) .nodesToUpgrade(UPGRADED_NODE) .upgradesFrom(v3X) - .withConfig(config -> config.with(NETWORK, GOSSIP)) + .withConfig(config -> config.with(NETWORK, GOSSIP) + // below property is conciesly set to false as we have new config in the next version + // that doesn't exist in the earlier one; we want to ignore it. (CASSANDRA-17532) + .set(Constants.KEY_DTEST_API_CONFIG_CHECK, false)) .setup(cluster -> { cluster.schemaChange(CREATE_TABLE); cluster.setUncaughtExceptionsFilter(throwable -> throwable instanceof RejectedExecutionException); diff --git a/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeReplicationTestBase.java b/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeReplicationTestBase.java index 3f2da7aab5c0..2d7a11d87455 100644 --- a/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeReplicationTestBase.java +++ b/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeReplicationTestBase.java @@ -23,6 +23,7 @@ import com.vdurmont.semver4j.Semver; +import org.apache.cassandra.distributed.Constants; import org.apache.cassandra.distributed.api.ConsistencyLevel; import static org.apache.cassandra.distributed.shared.AssertUtils.assertRows; @@ -47,6 +48,10 @@ protected void testSimpleStrategy(Semver from, Semver to) throws Throwable .nodes(3) .nodesToUpgrade(1, 2) .upgrades(from, to) + .withConfig(config -> config + // below property is conciesly set to false as we have new config in the next version + // that doesn't exist in the earlier one; we want to ignore it. (CASSANDRA-17532) + .set(Constants.KEY_DTEST_API_CONFIG_CHECK, false)) .setup(cluster -> { cluster.schemaChange("CREATE KEYSPACE test_simple WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 2};"); cluster.schemaChange("CREATE TABLE test_simple.names (key int PRIMARY KEY, name text)"); diff --git a/test/distributed/org/apache/cassandra/distributed/upgrade/PagingTest.java b/test/distributed/org/apache/cassandra/distributed/upgrade/PagingTest.java index 30e248d2b259..f7241d5b35ef 100644 --- a/test/distributed/org/apache/cassandra/distributed/upgrade/PagingTest.java +++ b/test/distributed/org/apache/cassandra/distributed/upgrade/PagingTest.java @@ -31,9 +31,9 @@ import com.datastax.driver.core.Session; import com.datastax.driver.core.SimpleStatement; import com.datastax.driver.core.Statement; +import org.apache.cassandra.distributed.Constants; import org.apache.cassandra.distributed.api.ConsistencyLevel; import org.apache.cassandra.distributed.shared.DistributedTestBase; -import org.apache.cassandra.distributed.shared.Versions; import static org.apache.cassandra.distributed.api.Feature.GOSSIP; import static org.apache.cassandra.distributed.api.Feature.NATIVE_PROTOCOL; @@ -50,7 +50,10 @@ public void testReads() throws Throwable .nodes(2) .upgrades(v22, v30) .nodesToUpgrade(2) - .withConfig(config -> config.with(GOSSIP, NETWORK, NATIVE_PROTOCOL)) + .withConfig(config -> config.with(GOSSIP, NETWORK, NATIVE_PROTOCOL) + // below property is conciesly set to false as we have new config in the next version + // that doesn't exist in the earlier one; we want to ignore it. (CASSANDRA-17532) + .set(Constants.KEY_DTEST_API_CONFIG_CHECK, false)) .setup((cluster) -> { cluster.disableAutoCompaction(DistributedTestBase.KEYSPACE); cluster.schemaChange("CREATE TABLE " + DistributedTestBase.KEYSPACE + ".tbl (pk int, ck int, v text, PRIMARY KEY (pk, ck)) "); diff --git a/test/distributed/org/apache/cassandra/distributed/upgrade/Pre40MessageFilterTest.java b/test/distributed/org/apache/cassandra/distributed/upgrade/Pre40MessageFilterTest.java index 3e6c9ca7bf9d..b7acf8cde2f6 100644 --- a/test/distributed/org/apache/cassandra/distributed/upgrade/Pre40MessageFilterTest.java +++ b/test/distributed/org/apache/cassandra/distributed/upgrade/Pre40MessageFilterTest.java @@ -18,6 +18,7 @@ package org.apache.cassandra.distributed.upgrade; +import org.apache.cassandra.distributed.Constants; import org.apache.cassandra.distributed.api.Feature; import org.apache.cassandra.distributed.api.IInstanceConfig; import org.junit.Test; @@ -30,7 +31,7 @@ public class Pre40MessageFilterTest extends UpgradeTestBase { public void reserializePre40RequestPaxosTest(Consumer configConsumer) throws Throwable { - new UpgradeTestBase.TestCase() + new TestCase() .nodes(2) .withConfig(configConsumer) .nodesToUpgrade(1) @@ -54,12 +55,18 @@ public void reserializePre40RequestPaxosTest(Consumer configCon @Test public void reserializePre40RequestPaxosWithoutNetworkTest() throws Throwable { - reserializePre40RequestPaxosTest(config -> {}); + reserializePre40RequestPaxosTest(config -> config + // below property is conciesly set to false as we have new config in the next version + // that doesn't exist in the earlier one; we want to ignore it. (CASSANDRA-17532) + .set(Constants.KEY_DTEST_API_CONFIG_CHECK, false)); } @Test public void reserializePre40RequestPaxosWithNetworkTest() throws Throwable { - reserializePre40RequestPaxosTest(config -> config.with(Feature.NETWORK, Feature.GOSSIP)); + reserializePre40RequestPaxosTest(config -> config.with(Feature.NETWORK, Feature.GOSSIP) + // below property is conciesly set to false as we have new config in the next version + // that doesn't exist in the earlier one; we want to ignore it. (CASSANDRA-17532) + .set(Constants.KEY_DTEST_API_CONFIG_CHECK, false)); } } diff --git a/test/distributed/org/apache/cassandra/distributed/upgrade/ReadRepairCompactStorageUpgradeTest.java b/test/distributed/org/apache/cassandra/distributed/upgrade/ReadRepairCompactStorageUpgradeTest.java index 5567d4010ac9..788c7c3cbeca 100644 --- a/test/distributed/org/apache/cassandra/distributed/upgrade/ReadRepairCompactStorageUpgradeTest.java +++ b/test/distributed/org/apache/cassandra/distributed/upgrade/ReadRepairCompactStorageUpgradeTest.java @@ -20,6 +20,7 @@ import org.junit.Test; +import org.apache.cassandra.distributed.Constants; import org.apache.cassandra.distributed.api.ConsistencyLevel; import org.apache.cassandra.distributed.shared.Versions; @@ -36,6 +37,10 @@ public void mixedModeReadRepairCompactStorage() throws Throwable new TestCase() .nodes(2) .upgrades(v22, v3X) + .withConfig((cfg) -> cfg + // below property is conciesly set to false as we have new config in the next version + // that doesn't exist in the earlier one; we want to ignore it. (CASSANDRA-17532) + .set(Constants.KEY_DTEST_API_CONFIG_CHECK, false)) .setup((cluster) -> cluster.schemaChange(withKeyspace("CREATE TABLE %s.tbl" + " (pk ascii, b boolean, v blob, PRIMARY KEY (pk))" + " WITH COMPACT STORAGE"))) diff --git a/test/distributed/org/apache/cassandra/distributed/upgrade/UpgradeTest.java b/test/distributed/org/apache/cassandra/distributed/upgrade/UpgradeTest.java index 691d8af94f7e..40acec152d78 100644 --- a/test/distributed/org/apache/cassandra/distributed/upgrade/UpgradeTest.java +++ b/test/distributed/org/apache/cassandra/distributed/upgrade/UpgradeTest.java @@ -20,9 +20,10 @@ import org.junit.Test; +import org.apache.cassandra.distributed.Constants; import org.apache.cassandra.distributed.api.ConsistencyLevel; import org.apache.cassandra.distributed.api.Feature; -import org.apache.cassandra.distributed.shared.Versions; + import static org.apache.cassandra.distributed.shared.AssertUtils.*; public class UpgradeTest extends UpgradeTestBase @@ -33,7 +34,10 @@ public void simpleUpgradeWithNetworkAndGossipTest() throws Throwable new TestCase() .nodes(2) .nodesToUpgrade(1) - .withConfig((cfg) -> cfg.with(Feature.NETWORK, Feature.GOSSIP)) + .withConfig((cfg) -> cfg.with(Feature.NETWORK, Feature.GOSSIP) + // below property is conciesly set to false as we have new config in the next version + // that doesn't exist in the earlier one; we want to ignore it. (CASSANDRA-17532) + .set(Constants.KEY_DTEST_API_CONFIG_CHECK, false)) .upgradesFrom(v3X) .setup((cluster) -> { cluster.schemaChange("CREATE TABLE " + KEYSPACE + ".tbl (pk int, ck int, v int, PRIMARY KEY (pk, ck))"); From a0a28a8babb2e37d34fd09e67f06a38ef5cb9050 Mon Sep 17 00:00:00 2001 From: Ekaterina Dimitrova Date: Wed, 6 Apr 2022 18:49:46 -0400 Subject: [PATCH 2/2] Circle CI trash config, DO NOT COMMIT --- .circleci/config.yml | 106 +++++++++++++++++++++---------------------- 1 file changed, 53 insertions(+), 53 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4041abde67ca..4b5616d938a1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -21,10 +21,10 @@ jobs: j8_jvm_upgrade_dtests: docker: - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:20210929 - resource_class: medium + resource_class: large working_directory: ~/ shell: /bin/bash -eo pipefail -l - parallelism: 1 + parallelism: 4 steps: - attach_workspace: at: /home/cassandra @@ -130,10 +130,10 @@ jobs: repeated_jvm_upgrade_dtest: docker: - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:20210929 - resource_class: medium + resource_class: large working_directory: ~/ shell: /bin/bash -eo pipefail -l - parallelism: 4 + parallelism: 25 steps: - attach_workspace: at: /home/cassandra @@ -305,10 +305,10 @@ jobs: j8_cqlsh-dtests-py2-with-vnodes: docker: - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:20210929 - resource_class: medium + resource_class: large working_directory: ~/ shell: /bin/bash -eo pipefail -l - parallelism: 4 + parallelism: 50 steps: - attach_workspace: at: /home/cassandra @@ -403,7 +403,7 @@ jobs: resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l - parallelism: 4 + parallelism: 25 steps: - attach_workspace: at: /home/cassandra @@ -510,10 +510,10 @@ jobs: repeated_upgrade_dtest: docker: - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:20210929 - resource_class: medium + resource_class: xlarge working_directory: ~/ shell: /bin/bash -eo pipefail -l - parallelism: 4 + parallelism: 25 steps: - attach_workspace: at: /home/cassandra @@ -632,10 +632,10 @@ jobs: j8_cqlsh-dtests-py38-no-vnodes: docker: - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:20210929 - resource_class: medium + resource_class: large working_directory: ~/ shell: /bin/bash -eo pipefail -l - parallelism: 4 + parallelism: 50 steps: - attach_workspace: at: /home/cassandra @@ -727,10 +727,10 @@ jobs: j11_cqlsh-dtests-py3-with-vnodes: docker: - image: apache/cassandra-testing-ubuntu2004-java11:20210304 - resource_class: medium + resource_class: large working_directory: ~/ shell: /bin/bash -eo pipefail -l - parallelism: 4 + parallelism: 50 steps: - attach_workspace: at: /home/cassandra @@ -823,10 +823,10 @@ jobs: j11_cqlsh-dtests-py3-no-vnodes: docker: - image: apache/cassandra-testing-ubuntu2004-java11:20210304 - resource_class: medium + resource_class: large working_directory: ~/ shell: /bin/bash -eo pipefail -l - parallelism: 4 + parallelism: 50 steps: - attach_workspace: at: /home/cassandra @@ -919,10 +919,10 @@ jobs: j11_cqlsh-dtests-py38-with-vnodes: docker: - image: apache/cassandra-testing-ubuntu2004-java11:20210304 - resource_class: medium + resource_class: large working_directory: ~/ shell: /bin/bash -eo pipefail -l - parallelism: 4 + parallelism: 50 steps: - attach_workspace: at: /home/cassandra @@ -1015,10 +1015,10 @@ jobs: j8_cqlsh-dtests-py3-with-vnodes: docker: - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:20210929 - resource_class: medium + resource_class: large working_directory: ~/ shell: /bin/bash -eo pipefail -l - parallelism: 4 + parallelism: 50 steps: - attach_workspace: at: /home/cassandra @@ -1110,10 +1110,10 @@ jobs: j8_cqlsh-dtests-py2-no-vnodes: docker: - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:20210929 - resource_class: medium + resource_class: large working_directory: ~/ shell: /bin/bash -eo pipefail -l - parallelism: 4 + parallelism: 50 steps: - attach_workspace: at: /home/cassandra @@ -1205,10 +1205,10 @@ jobs: j11_repeated_dtest: docker: - image: apache/cassandra-testing-ubuntu2004-java11:20210304 - resource_class: medium + resource_class: large working_directory: ~/ shell: /bin/bash -eo pipefail -l - parallelism: 4 + parallelism: 25 steps: - attach_workspace: at: /home/cassandra @@ -1350,10 +1350,10 @@ jobs: j8_repeated_dtest: docker: - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:20210929 - resource_class: medium + resource_class: large working_directory: ~/ shell: /bin/bash -eo pipefail -l - parallelism: 4 + parallelism: 25 steps: - attach_workspace: at: /home/cassandra @@ -1472,10 +1472,10 @@ jobs: j11_cqlsh-dtests-py2-with-vnodes: docker: - image: apache/cassandra-testing-ubuntu2004-java11:20210304 - resource_class: medium + resource_class: large working_directory: ~/ shell: /bin/bash -eo pipefail -l - parallelism: 4 + parallelism: 50 steps: - attach_workspace: at: /home/cassandra @@ -1568,10 +1568,10 @@ jobs: j11_dtests-with-vnodes: docker: - image: apache/cassandra-testing-ubuntu2004-java11:20210304 - resource_class: medium + resource_class: large working_directory: ~/ shell: /bin/bash -eo pipefail -l - parallelism: 4 + parallelism: 50 steps: - attach_workspace: at: /home/cassandra @@ -1667,10 +1667,10 @@ jobs: j8_dtests-no-vnodes: docker: - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:20210929 - resource_class: medium + resource_class: large working_directory: ~/ shell: /bin/bash -eo pipefail -l - parallelism: 4 + parallelism: 50 steps: - attach_workspace: at: /home/cassandra @@ -1743,10 +1743,10 @@ jobs: j8_upgradetests-no-vnodes: docker: - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:20210929 - resource_class: medium + resource_class: xlarge working_directory: ~/ shell: /bin/bash -eo pipefail -l - parallelism: 4 + parallelism: 100 steps: - attach_workspace: at: /home/cassandra @@ -1885,7 +1885,7 @@ jobs: resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l - parallelism: 4 + parallelism: 25 steps: - attach_workspace: at: /home/cassandra @@ -1994,7 +1994,7 @@ jobs: resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l - parallelism: 1 + parallelism: 10 steps: - attach_workspace: at: /home/cassandra @@ -2200,10 +2200,10 @@ jobs: j11_cqlsh-dtests-py2-no-vnodes: docker: - image: apache/cassandra-testing-ubuntu2004-java11:20210304 - resource_class: medium + resource_class: large working_directory: ~/ shell: /bin/bash -eo pipefail -l - parallelism: 4 + parallelism: 50 steps: - attach_workspace: at: /home/cassandra @@ -2354,7 +2354,7 @@ jobs: resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l - parallelism: 4 + parallelism: 25 steps: - attach_workspace: at: /home/cassandra @@ -2527,10 +2527,10 @@ jobs: j8_dtests-with-vnodes: docker: - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:20210929 - resource_class: medium + resource_class: large working_directory: ~/ shell: /bin/bash -eo pipefail -l - parallelism: 4 + parallelism: 50 steps: - attach_workspace: at: /home/cassandra @@ -2603,10 +2603,10 @@ jobs: j11_cqlsh-dtests-py38-no-vnodes: docker: - image: apache/cassandra-testing-ubuntu2004-java11:20210304 - resource_class: medium + resource_class: large working_directory: ~/ shell: /bin/bash -eo pipefail -l - parallelism: 4 + parallelism: 50 steps: - attach_workspace: at: /home/cassandra @@ -2699,10 +2699,10 @@ jobs: j8_jvm_dtests: docker: - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:20210929 - resource_class: medium + resource_class: large working_directory: ~/ shell: /bin/bash -eo pipefail -l - parallelism: 1 + parallelism: 10 steps: - attach_workspace: at: /home/cassandra @@ -2906,10 +2906,10 @@ jobs: j8_cqlsh-dtests-py3-no-vnodes: docker: - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:20210929 - resource_class: medium + resource_class: large working_directory: ~/ shell: /bin/bash -eo pipefail -l - parallelism: 4 + parallelism: 50 steps: - attach_workspace: at: /home/cassandra @@ -3001,10 +3001,10 @@ jobs: j8_cqlsh-dtests-py38-with-vnodes: docker: - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:20210929 - resource_class: medium + resource_class: large working_directory: ~/ shell: /bin/bash -eo pipefail -l - parallelism: 4 + parallelism: 50 steps: - attach_workspace: at: /home/cassandra @@ -3162,7 +3162,7 @@ jobs: resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l - parallelism: 4 + parallelism: 25 steps: - attach_workspace: at: /home/cassandra @@ -3385,10 +3385,10 @@ jobs: j11_dtests-no-vnodes: docker: - image: apache/cassandra-testing-ubuntu2004-java11:20210304 - resource_class: medium + resource_class: large working_directory: ~/ shell: /bin/bash -eo pipefail -l - parallelism: 4 + parallelism: 50 steps: - attach_workspace: at: /home/cassandra @@ -3487,7 +3487,7 @@ jobs: resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l - parallelism: 4 + parallelism: 25 steps: - attach_workspace: at: /home/cassandra @@ -3596,7 +3596,7 @@ jobs: resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l - parallelism: 4 + parallelism: 25 steps: - attach_workspace: at: /home/cassandra