From 99fba8e3a8dc319429da42fab83eb47d9a9e767c Mon Sep 17 00:00:00 2001 From: Yaniv Michael Kaul Date: Mon, 9 Feb 2026 17:56:40 +0200 Subject: [PATCH] tests: enable vector integration tests on Scylla 2025.4+ Vector type is supported on Scylla 2025.4 and above. Enable the integration tests. Tested locally against both 2025.4.2 and 2026.1 and they pass. Tested locally against 2025.1, where it is skipped, as it should be. Signed-off-by: Yaniv Kaul --- tests/integration/__init__.py | 8 ++++++++ tests/integration/standard/test_types.py | 5 +++-- 2 files changed, 11 insertions(+), 2 deletions(-) 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):