diff --git a/tests/integration/__init__.py b/tests/integration/__init__.py index b4eab35875..dfac2dc1d9 100644 --- a/tests/integration/__init__.py +++ b/tests/integration/__init__.py @@ -279,6 +279,11 @@ def xfail_scylla_version(filter: Callable[[Version], bool], reason: str, *args, greaterthanorequalcass3_11 = unittest.skipUnless(CASSANDRA_VERSION >= Version('3.11'), 'Cassandra version 3.11 or greater required') greaterthanorequalcass40 = unittest.skipUnless(CASSANDRA_VERSION >= Version('4.0'), 'Cassandra version 4.0 or greater required') greaterthanorequalcass50 = unittest.skipUnless(CASSANDRA_VERSION >= Version('5.0-beta'), 'Cassandra version 5.0 or greater required') +def _has_vector_type(): + if SCYLLA_VERSION is not None: + return Version(get_scylla_version(SCYLLA_VERSION)) >= Version('2025.4') + return CASSANDRA_VERSION >= Version('5.0-beta') + lessthanorequalcass40 = unittest.skipUnless(CASSANDRA_VERSION <= Version('4.0'), 'Cassandra version less or equal to 4.0 required') lessthancass40 = unittest.skipUnless(CASSANDRA_VERSION < Version('4.0'), 'Cassandra version less than 4.0 required') lessthancass30 = unittest.skipUnless(CASSANDRA_VERSION < Version('3.0'), 'Cassandra version less then 3.0 required') @@ -297,6 +302,9 @@ def xfail_scylla_version(filter: Callable[[Version], bool], reason: str, *args, reason='Scylla does not support composite types') requires_custom_payload = pytest.mark.skipif(SCYLLA_VERSION is not None or PROTOCOL_VERSION < 4, reason='Scylla does not support custom payloads. Cassandra requires native protocol v4.0+') +requires_vector_type = unittest.skipUnless( + _has_vector_type(), + 'Cassandra >= 5.0 or Scylla >= 2025.4 required') xfail_scylla = lambda reason, *args, **kwargs: pytest.mark.xfail(SCYLLA_VERSION is not None, reason=reason, *args, **kwargs) incorrect_test = lambda reason='This test seems to be incorrect and should be fixed', *args, **kwargs: pytest.mark.xfail(reason=reason, *args, **kwargs) diff --git a/tests/integration/standard/test_types.py b/tests/integration/standard/test_types.py index ad69fbada9..1d66ce1ed9 100644 --- a/tests/integration/standard/test_types.py +++ b/tests/integration/standard/test_types.py @@ -40,7 +40,8 @@ from tests.integration import use_singledc, execute_until_pass, notprotocolv1, \ BasicSharedKeyspaceUnitTestCase, greaterthancass21, lessthancass30, \ - greaterthanorequalcass3_10, TestCluster, requires_composite_type, greaterthanorequalcass50 + greaterthanorequalcass3_10, TestCluster, requires_composite_type, \ + requires_vector_type from tests.integration.datatype_utils import update_datatypes, PRIMITIVE_DATATYPES, COLLECTION_TYPES, PRIMITIVE_DATATYPES_KEYS, \ get_sample, get_all_samples, get_collection_sample import pytest @@ -984,7 +985,7 @@ def run_inserts_at_version(self, proto_ver): finally: session.cluster.shutdown() -@greaterthanorequalcass50 +@requires_vector_type class TypeTestsVector(BasicSharedKeyspaceUnitTestCase): def _get_first_j(self, rs):