You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by be...@apache.org on 2021/05/07 08:07:18 UTC

[cassandra-dtest] branch trunk updated: Add 4_0_x to Python DTest's upgrade_manifest

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

bereng pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra-dtest.git


The following commit(s) were added to refs/heads/trunk by this push:
     new bfd6bed  Add 4_0_x to Python DTest's upgrade_manifest
bfd6bed is described below

commit bfd6bed9cc9d2cb3a93f67b60bd4ce5e87515b86
Author: Bereng <be...@gmail.com>
AuthorDate: Tue May 4 10:06:44 2021 +0200

    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 <mc...@apache.org>
    Co-authored-by: Bereng <be...@gmail.com>
---
 upgrade_tests/cql_tests.py        | 20 ++++++++++++++------
 upgrade_tests/paging_test.py      |  4 ++--
 upgrade_tests/upgrade_manifest.py | 20 ++++++++++++++------
 3 files changed, 30 insertions(+), 14 deletions(-)

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 @@ class TestCQL(UpgradeTester):
         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 @@ class TestPagingData(BasePagingTester, PageAssertionMixin):
             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 @@ class TestPagingData(BasePagingTester, PageAssertionMixin):
             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_2_2 = '2.2'
 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 @@ def set_version_family():
         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 @@ indev_3_0_x = VersionMeta(name='indev_3_0_x', family=CASSANDRA_3_0, variant='ind
 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 @@ indev_trunk = VersionMeta(name='indev_trunk', family=TRUNK, variant='indev', ver
 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):

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org