Skip to content

Commit 0b1802b

Browse files
mykauldkropachev
authored andcommitted
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 <yaniv.kaul@scylladb.com>
1 parent cc6df48 commit 0b1802b

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

tests/integration/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,11 @@ def xfail_scylla_version(filter: Callable[[Version], bool], reason: str, *args,
279279
greaterthanorequalcass3_11 = unittest.skipUnless(CASSANDRA_VERSION >= Version('3.11'), 'Cassandra version 3.11 or greater required')
280280
greaterthanorequalcass40 = unittest.skipUnless(CASSANDRA_VERSION >= Version('4.0'), 'Cassandra version 4.0 or greater required')
281281
greaterthanorequalcass50 = unittest.skipUnless(CASSANDRA_VERSION >= Version('5.0-beta'), 'Cassandra version 5.0 or greater required')
282+
def _has_vector_type():
283+
if SCYLLA_VERSION is not None:
284+
return Version(get_scylla_version(SCYLLA_VERSION)) >= Version('2025.4')
285+
return CASSANDRA_VERSION >= Version('5.0-beta')
286+
282287
lessthanorequalcass40 = unittest.skipUnless(CASSANDRA_VERSION <= Version('4.0'), 'Cassandra version less or equal to 4.0 required')
283288
lessthancass40 = unittest.skipUnless(CASSANDRA_VERSION < Version('4.0'), 'Cassandra version less than 4.0 required')
284289
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,
297302
reason='Scylla does not support composite types')
298303
requires_custom_payload = pytest.mark.skipif(SCYLLA_VERSION is not None or PROTOCOL_VERSION < 4,
299304
reason='Scylla does not support custom payloads. Cassandra requires native protocol v4.0+')
305+
requires_vector_type = unittest.skipUnless(
306+
_has_vector_type(),
307+
'Cassandra >= 5.0 or Scylla >= 2025.4 required')
300308
xfail_scylla = lambda reason, *args, **kwargs: pytest.mark.xfail(SCYLLA_VERSION is not None, reason=reason, *args, **kwargs)
301309
incorrect_test = lambda reason='This test seems to be incorrect and should be fixed', *args, **kwargs: pytest.mark.xfail(reason=reason, *args, **kwargs)
302310

tests/integration/standard/test_types.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@
4040

4141
from tests.integration import use_singledc, execute_until_pass, notprotocolv1, \
4242
BasicSharedKeyspaceUnitTestCase, greaterthancass21, lessthancass30, \
43-
greaterthanorequalcass3_10, TestCluster, requires_composite_type, greaterthanorequalcass50
43+
greaterthanorequalcass3_10, TestCluster, requires_composite_type, \
44+
requires_vector_type
4445
from tests.integration.datatype_utils import update_datatypes, PRIMITIVE_DATATYPES, COLLECTION_TYPES, PRIMITIVE_DATATYPES_KEYS, \
4546
get_sample, get_all_samples, get_collection_sample
4647
import pytest
@@ -984,7 +985,7 @@ def run_inserts_at_version(self, proto_ver):
984985
finally:
985986
session.cluster.shutdown()
986987

987-
@greaterthanorequalcass50
988+
@requires_vector_type
988989
class TypeTestsVector(BasicSharedKeyspaceUnitTestCase):
989990

990991
def _get_first_j(self, rs):

0 commit comments

Comments
 (0)