Add 4_0_x to Python DTest's upgrade_manifest
patch by Berenguer Blasi; reviewed by Mick Semb Wever for CASSANDRA-16648
Co-authored-by: Mick Semb Wever <mck@apache.org>
Co-authored-by: Bereng <berenguerblasi@gmail.com>
diff --git a/upgrade_tests/cql_tests.py b/upgrade_tests/cql_tests.py
index 12f1d59..c2bfe99 100644
--- a/upgrade_tests/cql_tests.py
+++ b/upgrade_tests/cql_tests.py
@@ -5499,12 +5499,20 @@
cursor.execute("CREATE KEYSPACE foo WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1}")
cursor.execute("CREATE TABLE foo.test1 (k int, t int, v int, PRIMARY KEY(k, t))")
- cursor.execute("""
- CREATE MATERIALIZED VIEW foo.view1
- AS SELECT * FROM foo.test1
- WHERE v IS NOT NULL AND t IS NOT NULL
- PRIMARY KEY (k, v, t)
- """)
+ if self.is_40_or_greater():
+ cursor.execute("""
+ CREATE MATERIALIZED VIEW foo.view1
+ AS SELECT * FROM foo.test1
+ WHERE k IS NOT NULL AND v IS NOT NULL AND t IS NOT NULL
+ PRIMARY KEY (k, v, t)
+ """)
+ else:
+ cursor.execute("""
+ CREATE MATERIALIZED VIEW foo.view1
+ AS SELECT * FROM foo.test1
+ WHERE v IS NOT NULL AND t IS NOT NULL
+ PRIMARY KEY (k, v, t)
+ """)
for i in range(0, 10):
cursor.execute("INSERT INTO foo.test1(k, t, v) VALUES (0, %d, %d)" % (i, 10 - i - 1))
diff --git a/upgrade_tests/paging_test.py b/upgrade_tests/paging_test.py
index 06c5dfd..7c3bd37 100644
--- a/upgrade_tests/paging_test.py
+++ b/upgrade_tests/paging_test.py
@@ -480,7 +480,7 @@
if testing_compact_storage:
cursor.execute("TRUNCATE test2")
- tables = ("test", "test2") if testing_compact_storage else ("test")
+ tables = ["test", "test2"] if testing_compact_storage else ["test"]
for table in tables:
logger.debug("Querying table %s" % (table,))
expected = []
@@ -534,7 +534,7 @@
if testing_compact_storage:
cursor.execute("TRUNCATE test2")
- tables = ("test", "test2") if testing_compact_storage else ("test")
+ tables = ["test", "test2"] if testing_compact_storage else ["test"]
for table in tables:
logger.debug("Querying table %s" % (table,))
expected = []
diff --git a/upgrade_tests/upgrade_manifest.py b/upgrade_tests/upgrade_manifest.py
index 6d4ad5e..7cf4910 100644
--- a/upgrade_tests/upgrade_manifest.py
+++ b/upgrade_tests/upgrade_manifest.py
@@ -26,7 +26,8 @@
CASSANDRA_3_0 = '3.0'
CASSANDRA_3_11 = '3.11'
CASSANDRA_4_0 = '4.0'
-TRUNK = CASSANDRA_4_0
+CASSANDRA_4_1 = '4.1'
+TRUNK = CASSANDRA_4_1
def is_same_family_current_to_indev(origin, destination):
"""
@@ -97,6 +98,8 @@
version_family = CASSANDRA_3_11
elif current_version.vstring.startswith('4.0'):
version_family = CASSANDRA_4_0
+ elif current_version.vstring.startswith('4.1'):
+ version_family = CASSANDRA_4_1
else:
# when this occurs, it's time to update this manifest a bit!
raise RuntimeError("Testing upgrades from/to version %s is not supported. Please use a custom manifest (see upgrade_manifest.py)" % current_version.vstring)
@@ -154,7 +157,10 @@
current_3_0_x = VersionMeta(name='current_3_0_x', family=CASSANDRA_3_0, variant='current', version='3.0.24', min_proto_v=3, max_proto_v=4, java_versions=(8,))
indev_3_11_x = VersionMeta(name='indev_3_11_x', family=CASSANDRA_3_11, variant='indev', version='github:apache/cassandra-3.11', min_proto_v=3, max_proto_v=4, java_versions=(8,))
-current_3_11_x = VersionMeta(name='current_3_11_x', family=CASSANDRA_3_11, variant='current', version='3.11.9', min_proto_v=3, max_proto_v=4, java_versions=(8,))
+current_3_11_x = VersionMeta(name='current_3_11_x', family=CASSANDRA_3_11, variant='current', version='3.11.10', min_proto_v=3, max_proto_v=4, java_versions=(8,))
+
+indev_4_0_x = VersionMeta(name='indev_4_0_x', family=CASSANDRA_4_0, variant='indev', version='github:apache/cassandra-4.0', min_proto_v=3, max_proto_v=4, java_versions=(8,))
+current_4_0_x = VersionMeta(name='current_4_0_x', family=CASSANDRA_4_0, variant='current', version='4.0-rc1', min_proto_v=4, max_proto_v=5, java_versions=(8,))
indev_trunk = VersionMeta(name='indev_trunk', family=TRUNK, variant='indev', version='github:apache/trunk', min_proto_v=4, max_proto_v=5, java_versions=(8,))
@@ -170,12 +176,14 @@
MANIFEST = {
current_2_1_x: [indev_2_2_x, indev_3_0_x, indev_3_11_x],
current_2_2_x: [indev_2_2_x, indev_3_0_x, indev_3_11_x],
- current_3_0_x: [indev_3_0_x, indev_3_11_x, indev_trunk],
- current_3_11_x: [indev_3_11_x, indev_trunk],
+ current_3_0_x: [indev_3_0_x, indev_3_11_x, indev_4_0_x],
+ current_3_11_x: [indev_3_11_x, indev_4_0_x],
+ current_4_0_x: [indev_4_0_x, indev_trunk],
indev_2_2_x: [indev_3_0_x, indev_3_11_x],
- indev_3_0_x: [indev_3_11_x, indev_trunk],
- indev_3_11_x: [indev_trunk]
+ indev_3_0_x: [indev_3_11_x, indev_4_0_x],
+ indev_3_11_x: [indev_4_0_x],
+ indev_4_0_x: [indev_trunk]
}
def _have_common_proto(origin_meta, destination_meta):