diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index bccbdc63cc..b75ef57c42 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -68,6 +68,6 @@ jobs: - name: Test with pytest run: | export EVENT_LOOP_MANAGER=${{ matrix.event_loop_manager }} - export SCYLLA_VERSION='release:6.2' + export SCYLLA_VERSION='release:2025.2' export PROTOCOL_VERSION=4 uv run pytest tests/integration/standard/ tests/integration/cqlengine/ diff --git a/tests/integration/__init__.py b/tests/integration/__init__.py index 770b000fca..96aa8fdbee 100644 --- a/tests/integration/__init__.py +++ b/tests/integration/__init__.py @@ -14,6 +14,7 @@ import re import os +from typing import Callable from cassandra.cluster import Cluster from tests import connection_class, EVENT_LOOP_MANAGER @@ -258,6 +259,13 @@ def _id_and_mark(f): return _id_and_mark +def xfail_scylla_version(filter: Callable[[Version], bool], reason: str, *args, **kwargs): + if SCYLLA_VERSION is None: + return pytest.mark.skipif(False, reason="It is just a NoOP Decor, should not skip anything") + current_version = Version(get_scylla_version(SCYLLA_VERSION)) + + return pytest.mark.xfail(filter(current_version), reason=reason, *args, **kwargs) + local = local_decorator_creator() notprotocolv1 = unittest.skipUnless(PROTOCOL_VERSION > 1, 'Protocol v1 not supported') greaterthanprotocolv3 = unittest.skipUnless(PROTOCOL_VERSION >= 4, 'Protocol versions less than 4 are not supported') @@ -297,7 +305,7 @@ def _id_and_mark(f): requiresmallclockgranularity = unittest.skipIf("Windows" in platform.system() or "asyncore" in EVENT_LOOP_MANAGER, "This test is not suitible for environments with large clock granularity") requiressimulacron = unittest.skipIf(SIMULACRON_JAR is None or CASSANDRA_VERSION < Version("2.1"), "Simulacron jar hasn't been specified or C* version is 2.0") - +requirescompactstorage = xfail_scylla_version(lambda v: v >= Version('2025.1.0'), reason="ScyllaDB deprecated compact storage", raises=InvalidRequest) libevtest = unittest.skipUnless(EVENT_LOOP_MANAGER=="libev", "Test timing designed for libev loop") def wait_for_node_socket(node, timeout): @@ -703,7 +711,6 @@ def xfail_scylla_version_lt(reason, oss_scylla_version, ent_scylla_version, *arg return pytest.mark.xfail(current_version < Version(oss_scylla_version), reason=reason, *args, **kwargs) - class UpDownWaiter(object): def __init__(self, host): diff --git a/tests/integration/standard/test_metadata.py b/tests/integration/standard/test_metadata.py index 8d677030f9..73bc40878a 100644 --- a/tests/integration/standard/test_metadata.py +++ b/tests/integration/standard/test_metadata.py @@ -42,7 +42,8 @@ greaterthancass21, assert_startswith, greaterthanorequalcass40, lessthancass40, TestCluster, requires_java_udf, requires_composite_type, - requires_collection_indexes, SCYLLA_VERSION, xfail_scylla, xfail_scylla_version_lt) + requires_collection_indexes, SCYLLA_VERSION, xfail_scylla, xfail_scylla_version_lt, + requirescompactstorage) from tests.util import wait_until @@ -428,6 +429,7 @@ def test_composite_in_compound_primary_key_ordering(self): self.check_create_statement(tablemeta, create_statement) @lessthancass40 + @requirescompactstorage def test_compact_storage(self): create_statement = self.make_create_statement(["a"], [], ["b"]) create_statement += " WITH COMPACT STORAGE" @@ -437,6 +439,7 @@ def test_compact_storage(self): self.check_create_statement(tablemeta, create_statement) @lessthancass40 + @requirescompactstorage def test_dense_compact_storage(self): create_statement = self.make_create_statement(["a"], ["b"], ["c"]) create_statement += " WITH COMPACT STORAGE" @@ -456,6 +459,7 @@ def test_counter(self): self.check_create_statement(tablemeta, create_statement) @lessthancass40 + @requirescompactstorage def test_counter_with_compact_storage(self): """ PYTHON-1100 """ create_statement = ( @@ -468,6 +472,7 @@ def test_counter_with_compact_storage(self): self.check_create_statement(tablemeta, create_statement) @lessthancass40 + @requirescompactstorage def test_counter_with_dense_compact_storage(self): create_statement = ( "CREATE TABLE {keyspace}.{table} (" @@ -2126,7 +2131,8 @@ def setUp(self): self.session.execute("CREATE TABLE {0}.{1} (pk int PRIMARY KEY, c int)".format(self.keyspace_name, self.function_table_name)) self.session.execute( "CREATE MATERIALIZED VIEW {0}.mv1 AS SELECT pk, c FROM {0}.{1} " - "WHERE pk IS NOT NULL AND c IS NOT NULL PRIMARY KEY (pk, c)".format( + "WHERE pk IS NOT NULL AND c IS NOT NULL PRIMARY KEY (pk, c) " + "WITH compaction = {{ 'class' : 'SizeTieredCompactionStrategy' }}".format( self.keyspace_name, self.function_table_name) )