This is an automated email from the ASF dual-hosted git repository.

maedhroz pushed a commit to branch cassandra-5.0
in repository https://gitbox.apache.org/repos/asf/cassandra.git


The following commit(s) were added to refs/heads/cassandra-5.0 by this push:
     new 184887069f Remove v30 and v3X from 5.x in-JVM upgrade tests
184887069f is described below

commit 184887069f18cb3afb7e747284d99f55cee41ec6
Author: Caleb Rackliffe <[email protected]>
AuthorDate: Wed Jan 8 11:19:50 2025 -0600

    Remove v30 and v3X from 5.x in-JVM upgrade tests
    
    patch by Caleb Rackliffe; reviewed by Mick Semb Wever and Brandon Williams 
for CASSANDRA-20103
---
 CHANGES.txt                                                    |  1 +
 .../upgrade/CompactStoragePagingWithProtocolTester.java        |  3 +--
 .../upgrade/CompactionHistorySystemTableUpgradeTest.java       |  2 +-
 .../distributed/upgrade/ConfigCompatibilityTestGenerate.java   |  4 +---
 .../upgrade/DropCompactStorageNullClusteringValuesTest.java    |  2 +-
 .../cassandra/distributed/upgrade/DropCompactStorageTest.java  |  2 +-
 .../org/apache/cassandra/distributed/upgrade/GroupByTest.java  |  2 +-
 .../distributed/upgrade/MixedModeAvailabilityTestBase.java     |  2 +-
 ...deConsistencyV30Test.java => MixedModeConsistencyTest.java} |  4 ++--
 ...From3LoggedBatchTest.java => MixedModeLoggedBatchTest.java} | 10 ++--------
 ...From3ReplicationTest.java => MixedModeReplicationTest.java} |  4 ++--
 ...3UnloggedBatchTest.java => MixedModeUnloggedBatchTest.java} | 10 ++--------
 .../distributed/upgrade/MixedModeWritetimeOrTTLTest.java       |  2 +-
 .../org/apache/cassandra/distributed/upgrade/UpgradeTest.java  |  2 +-
 .../apache/cassandra/distributed/upgrade/UpgradeTestBase.java  |  9 +--------
 15 files changed, 19 insertions(+), 40 deletions(-)

diff --git a/CHANGES.txt b/CHANGES.txt
index 8eb1fba300..0d11571d81 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 5.0.3
+ * Remove v30 and v3X from 5.x in-JVM upgrade tests (CASSANDRA-20103)
  * Avoid memory allocation in offheap_object's NativeCell.valueSize() and 
NativeClustering.dataSize() (CASSANDRA-20162)
  * Add flag to avoid invalidating key cache on sstable deletions 
(CASSANDRA-20068)
  * Interpret inet, bigint, varint, and decimal as non-reversed types for query 
construction and post-filtering (CASSANDRA-20100)
diff --git 
a/test/distributed/org/apache/cassandra/distributed/upgrade/CompactStoragePagingWithProtocolTester.java
 
b/test/distributed/org/apache/cassandra/distributed/upgrade/CompactStoragePagingWithProtocolTester.java
index 691ad4eb11..358bb8863e 100644
--- 
a/test/distributed/org/apache/cassandra/distributed/upgrade/CompactStoragePagingWithProtocolTester.java
+++ 
b/test/distributed/org/apache/cassandra/distributed/upgrade/CompactStoragePagingWithProtocolTester.java
@@ -132,8 +132,7 @@ public abstract class 
CompactStoragePagingWithProtocolTester extends UpgradeTest
         String query = withKeyspace("SELECT * FROM %s.t");
         assertRows(query, ProtocolVersion.V3, rows);
         assertRows(query, ProtocolVersion.V4, rows);
-        if (initialVersion().isGreaterThanOrEqualTo(v3X))
-            assertRows(query, ProtocolVersion.V5, rows);
+        assertRows(query, ProtocolVersion.V5, rows);
     }
 
     private static void assertRows(String query, ProtocolVersion 
protocolVersion, Object[]... expectedRows)
diff --git 
a/test/distributed/org/apache/cassandra/distributed/upgrade/CompactionHistorySystemTableUpgradeTest.java
 
b/test/distributed/org/apache/cassandra/distributed/upgrade/CompactionHistorySystemTableUpgradeTest.java
index 73e92dd423..2878864d31 100644
--- 
a/test/distributed/org/apache/cassandra/distributed/upgrade/CompactionHistorySystemTableUpgradeTest.java
+++ 
b/test/distributed/org/apache/cassandra/distributed/upgrade/CompactionHistorySystemTableUpgradeTest.java
@@ -47,7 +47,7 @@ public class CompactionHistorySystemTableUpgradeTest extends 
UpgradeTestBase
     @Parameters()
     public static ArrayList<Semver> versions()
     {
-        return Lists.newArrayList(v30, v3X, v40, v41);
+        return Lists.newArrayList(v40, v41);
     }
 
     @Test
diff --git 
a/test/distributed/org/apache/cassandra/distributed/upgrade/ConfigCompatibilityTestGenerate.java
 
b/test/distributed/org/apache/cassandra/distributed/upgrade/ConfigCompatibilityTestGenerate.java
index 65169dcf3a..841bec92e1 100644
--- 
a/test/distributed/org/apache/cassandra/distributed/upgrade/ConfigCompatibilityTestGenerate.java
+++ 
b/test/distributed/org/apache/cassandra/distributed/upgrade/ConfigCompatibilityTestGenerate.java
@@ -33,8 +33,6 @@ import org.apache.cassandra.distributed.shared.Versions;
 import static org.apache.cassandra.config.ConfigCompatibilityTest.TEST_DIR;
 import static org.apache.cassandra.config.ConfigCompatibilityTest.dump;
 import static org.apache.cassandra.config.ConfigCompatibilityTest.toTree;
-import static org.apache.cassandra.distributed.upgrade.UpgradeTestBase.v30;
-import static org.apache.cassandra.distributed.upgrade.UpgradeTestBase.v3X;
 import static org.apache.cassandra.distributed.upgrade.UpgradeTestBase.v40;
 import static org.apache.cassandra.distributed.upgrade.UpgradeTestBase.v41;
 import static org.apache.cassandra.distributed.upgrade.UpgradeTestBase.v50;
@@ -48,7 +46,7 @@ public class ConfigCompatibilityTestGenerate
     {
         ICluster.setup();
         Versions versions = Versions.find();
-        for (Semver version : Arrays.asList(v30, v3X, v40, v41, v50))
+        for (Semver version : Arrays.asList(v40, v41, v50))
         {
             File path = new File(TEST_DIR, "version=" + version + ".yml");
             path.getParentFile().mkdirs();
diff --git 
a/test/distributed/org/apache/cassandra/distributed/upgrade/DropCompactStorageNullClusteringValuesTest.java
 
b/test/distributed/org/apache/cassandra/distributed/upgrade/DropCompactStorageNullClusteringValuesTest.java
index 2e5578d2c2..ad2133e58a 100644
--- 
a/test/distributed/org/apache/cassandra/distributed/upgrade/DropCompactStorageNullClusteringValuesTest.java
+++ 
b/test/distributed/org/apache/cassandra/distributed/upgrade/DropCompactStorageNullClusteringValuesTest.java
@@ -33,7 +33,7 @@ public class DropCompactStorageNullClusteringValuesTest 
extends UpgradeTestBase
     public void testNullClusteringValues() throws Throwable
     {
         new TestCase().nodes(1)
-                      .upgradesToCurrentFrom(v30)
+                      .upgradesToCurrentFrom(OLDEST)
                       .withConfig(config -> config.with(GOSSIP, NETWORK, 
NATIVE_PROTOCOL).set("enable_drop_compact_storage", true))
                       .setup(cluster -> {
                           String create = "CREATE TABLE %s.%s(k int, c1 int, 
c2 int, v int, PRIMARY KEY (k, c1, c2)) " +
diff --git 
a/test/distributed/org/apache/cassandra/distributed/upgrade/DropCompactStorageTest.java
 
b/test/distributed/org/apache/cassandra/distributed/upgrade/DropCompactStorageTest.java
index 9846264e56..6d2b90fd4f 100644
--- 
a/test/distributed/org/apache/cassandra/distributed/upgrade/DropCompactStorageTest.java
+++ 
b/test/distributed/org/apache/cassandra/distributed/upgrade/DropCompactStorageTest.java
@@ -35,7 +35,7 @@ public class DropCompactStorageTest extends UpgradeTestBase
         new TestCase()
         .nodes(2)
         .nodesToUpgrade(1, 2)
-        .upgradesToCurrentFrom(v30)
+        .upgradesToCurrentFrom(OLDEST)
         .withConfig(config -> config.with(GOSSIP, 
NETWORK).set("enable_drop_compact_storage", true))
         .setup((cluster) -> {
             cluster.schemaChange("CREATE TABLE " + KEYSPACE + ".tbl (pk int, 
ck int, PRIMARY KEY (pk, ck)) WITH COMPACT STORAGE");
diff --git 
a/test/distributed/org/apache/cassandra/distributed/upgrade/GroupByTest.java 
b/test/distributed/org/apache/cassandra/distributed/upgrade/GroupByTest.java
index b2971cd15f..2b3339fd67 100644
--- a/test/distributed/org/apache/cassandra/distributed/upgrade/GroupByTest.java
+++ b/test/distributed/org/apache/cassandra/distributed/upgrade/GroupByTest.java
@@ -35,7 +35,7 @@ public class GroupByTest extends UpgradeTestBase
         // CASSANDRA-16582: group-by across mixed version cluster would fail 
with ArrayIndexOutOfBoundException
         new UpgradeTestBase.TestCase()
         .nodes(2)
-        .upgradesToCurrentFrom(v3X)
+        .upgradesToCurrentFrom(OLDEST)
         .nodesToUpgrade(1)
         .withConfig(config -> config.with(GOSSIP, NETWORK))
         .setup(cluster -> {
diff --git 
a/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeAvailabilityTestBase.java
 
b/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeAvailabilityTestBase.java
index d26f6761d5..584af8bba4 100644
--- 
a/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeAvailabilityTestBase.java
+++ 
b/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeAvailabilityTestBase.java
@@ -61,7 +61,7 @@ public abstract class MixedModeAvailabilityTestBase extends 
UpgradeTestBase
         new TestCase()
         .nodes(NUM_NODES)
         .nodesToUpgrade(upgradedCoordinator() ? 1 : 2)
-        .upgradesToCurrentFrom(v30)
+        .upgradesToCurrentFrom(OLDEST)
         .withConfig(config -> config.with(GOSSIP, NETWORK, NATIVE_PROTOCOL)
                                     .set("request_timeout_in_ms", 
MINUTES.toMillis(10))
                                     .set("read_request_timeout_in_ms", 
MINUTES.toMillis(10))
diff --git 
a/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeConsistencyV30Test.java
 
b/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeConsistencyTest.java
similarity index 98%
rename from 
test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeConsistencyV30Test.java
rename to 
test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeConsistencyTest.java
index 5ee80151a6..d1c583eda7 100644
--- 
a/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeConsistencyV30Test.java
+++ 
b/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeConsistencyTest.java
@@ -38,7 +38,7 @@ import static 
org.apache.cassandra.distributed.api.ConsistencyLevel.QUORUM;
 import static org.apache.cassandra.distributed.shared.AssertUtils.assertRows;
 import static org.apache.cassandra.distributed.shared.AssertUtils.row;
 
-public class MixedModeConsistencyV30Test extends UpgradeTestBase
+public class MixedModeConsistencyTest extends UpgradeTestBase
 {
     @Test
     public void testConsistency() throws Throwable
@@ -51,7 +51,7 @@ public class MixedModeConsistencyV30Test extends 
UpgradeTestBase
         new TestCase()
         .nodes(3)
         .nodesToUpgrade(1)
-        .upgradesToCurrentFrom(v30)
+        .upgradesToCurrentFrom(OLDEST)
         .withConfig(config -> config.set("read_request_timeout_in_ms", 
SECONDS.toMillis(30))
                                     .set("write_request_timeout_in_ms", 
SECONDS.toMillis(30)))
         .setup(cluster -> {
diff --git 
a/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeFrom3LoggedBatchTest.java
 
b/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeLoggedBatchTest.java
similarity index 80%
rename from 
test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeFrom3LoggedBatchTest.java
rename to 
test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeLoggedBatchTest.java
index 7326f6fec9..a1180bc689 100644
--- 
a/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeFrom3LoggedBatchTest.java
+++ 
b/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeLoggedBatchTest.java
@@ -20,17 +20,11 @@ package org.apache.cassandra.distributed.upgrade;
 
 import org.junit.Test;
 
-public class MixedModeFrom3LoggedBatchTest extends MixedModeBatchTestBase
+public class MixedModeLoggedBatchTest extends MixedModeBatchTestBase
 {
-    @Test
-    public void testSimpleStrategy30to3X() throws Throwable
-    {
-        testSimpleStrategy(v30, v3X, true);
-    }
-
     @Test
     public void testSimpleStrategy() throws Throwable
     {
-        testSimpleStrategy(v30, true);
+        testSimpleStrategy(OLDEST, true);
     }
 }
diff --git 
a/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeFrom3ReplicationTest.java
 
b/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeReplicationTest.java
similarity index 96%
rename from 
test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeFrom3ReplicationTest.java
rename to 
test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeReplicationTest.java
index 69d3dbec71..f436658122 100644
--- 
a/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeFrom3ReplicationTest.java
+++ 
b/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeReplicationTest.java
@@ -28,7 +28,7 @@ import org.apache.cassandra.distributed.api.ConsistencyLevel;
 import static org.apache.cassandra.distributed.shared.AssertUtils.assertRows;
 import static org.apache.cassandra.distributed.shared.AssertUtils.row;
 
-public class MixedModeFrom3ReplicationTest extends UpgradeTestBase
+public class MixedModeReplicationTest extends UpgradeTestBase
 {
     @Test
     public void testSimpleStrategy() throws Throwable
@@ -39,7 +39,7 @@ public class MixedModeFrom3ReplicationTest extends 
UpgradeTestBase
         new TestCase()
         .nodes(3)
         .nodesToUpgrade(1, 2)
-        .upgradesToCurrentFrom(v30)
+        .upgradesToCurrentFrom(OLDEST)
         .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/MixedModeFrom3UnloggedBatchTest.java
 
b/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeUnloggedBatchTest.java
similarity index 79%
rename from 
test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeFrom3UnloggedBatchTest.java
rename to 
test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeUnloggedBatchTest.java
index d169142367..583a179388 100644
--- 
a/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeFrom3UnloggedBatchTest.java
+++ 
b/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeUnloggedBatchTest.java
@@ -20,17 +20,11 @@ package org.apache.cassandra.distributed.upgrade;
 
 import org.junit.Test;
 
-public class MixedModeFrom3UnloggedBatchTest extends MixedModeBatchTestBase
+public class MixedModeUnloggedBatchTest extends MixedModeBatchTestBase
 {
-    @Test
-    public void testSimpleStrategy30to3X() throws Throwable
-    {
-        testSimpleStrategy(v30, v3X, false);
-    }
-
     @Test
     public void testSimpleStrategy() throws Throwable
     {
-        testSimpleStrategy(v30, false);
+        testSimpleStrategy(OLDEST, false);
     }
 }
diff --git 
a/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeWritetimeOrTTLTest.java
 
b/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeWritetimeOrTTLTest.java
index 295ffd2987..2ae891417a 100644
--- 
a/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeWritetimeOrTTLTest.java
+++ 
b/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeWritetimeOrTTLTest.java
@@ -45,7 +45,7 @@ public class MixedModeWritetimeOrTTLTest extends 
UpgradeTestBase
         new TestCase()
         .nodes(2)
         .nodesToUpgradeOrdered(1, 2)
-        .upgradesToCurrentFrom(v30)
+        .upgradesToCurrentFrom(OLDEST)
         .setup(cluster -> {
 
             ICoordinator coordinator = cluster.coordinator(1);
diff --git 
a/test/distributed/org/apache/cassandra/distributed/upgrade/UpgradeTest.java 
b/test/distributed/org/apache/cassandra/distributed/upgrade/UpgradeTest.java
index 55e1f1ea94..76977a7055 100644
--- a/test/distributed/org/apache/cassandra/distributed/upgrade/UpgradeTest.java
+++ b/test/distributed/org/apache/cassandra/distributed/upgrade/UpgradeTest.java
@@ -34,7 +34,7 @@ public class UpgradeTest extends UpgradeTestBase
         .nodes(2)
         .nodesToUpgrade(1)
         .withConfig((cfg) -> cfg.with(Feature.NETWORK, Feature.GOSSIP))
-        .upgradesToCurrentFrom(v3X)
+        .upgradesToCurrentFrom(OLDEST)
         .setup((cluster) -> {
             cluster.schemaChange("CREATE TABLE " + KEYSPACE + ".tbl (pk int, 
ck int, v int, PRIMARY KEY (pk, ck))");
             cluster.coordinator(1).execute("INSERT INTO " + KEYSPACE + ".tbl 
(pk, ck, v) VALUES (1, 1, 1)", ConsistencyLevel.ALL);
diff --git 
a/test/distributed/org/apache/cassandra/distributed/upgrade/UpgradeTestBase.java
 
b/test/distributed/org/apache/cassandra/distributed/upgrade/UpgradeTestBase.java
index 3f8f4d47c8..1d00af5c04 100644
--- 
a/test/distributed/org/apache/cassandra/distributed/upgrade/UpgradeTestBase.java
+++ 
b/test/distributed/org/apache/cassandra/distributed/upgrade/UpgradeTestBase.java
@@ -87,18 +87,11 @@ public class UpgradeTestBase extends DistributedTestBase
         public void run(UpgradeableCluster cluster, int node) throws Throwable;
     }
 
-    public static final Semver v30 = new Semver("3.0.0-alpha1", 
SemverType.LOOSE);
-    public static final Semver v3X = new Semver("3.11.0", SemverType.LOOSE);
     public static final Semver v40 = new Semver("4.0-alpha1", 
SemverType.LOOSE);
     public static final Semver v41 = new Semver("4.1-alpha1", 
SemverType.LOOSE);
     public static final Semver v50 = new Semver("5.0-alpha1", 
SemverType.LOOSE);
 
     protected static final SimpleGraph<Semver> SUPPORTED_UPGRADE_PATHS = new 
SimpleGraph.Builder<Semver>()
-                                                                         
.addEdge(v30, v3X)
-                                                                         
.addEdge(v30, v40)
-                                                                         
.addEdge(v30, v41)
-                                                                         
.addEdge(v3X, v40)
-                                                                         
.addEdge(v3X, v41)
                                                                          
.addEdge(v40, v41)
                                                                          
.addEdge(v40, v50)
                                                                          
.addEdge(v41, v50)
@@ -404,7 +397,7 @@ public class UpgradeTestBase extends DistributedTestBase
     protected TestCase allUpgrades(int nodes, int... toUpgrade)
     {
         return new TestCase().nodes(nodes)
-                             .upgradesToCurrentFrom(v30)
+                             .upgradesToCurrentFrom(OLDEST)
                              .nodesToUpgrade(toUpgrade);
     }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to