Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions tests/integration/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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)

Expand Down
5 changes: 3 additions & 2 deletions tests/integration/standard/test_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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):
Expand Down
Loading