Skip to content

Commit 17cf722

Browse files
committed
Start running tests on 6.2
1 parent 35369b2 commit 17cf722

File tree

5 files changed

+46
-7
lines changed

5 files changed

+46
-7
lines changed

.github/workflows/integration-tests.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ jobs:
4040
- name: Test with pytest
4141
run: |
4242
export EVENT_LOOP_MANAGER=${{ matrix.event_loop_manager }}
43-
export SCYLLA_VERSION='release:5.1'
43+
export SCYLLA_VERSION='release:6.2'
4444
./scripts/run_integration_test.sh tests/integration/standard/ tests/integration/cqlengine/
4545
4646
- name: Test tablets
4747
run: |
4848
export EVENT_LOOP_MANAGER=${{ matrix.event_loop_manager }}
49-
export SCYLLA_VERSION='release:6.0.2'
49+
export SCYLLA_VERSION='release:6.2'
5050
./scripts/run_integration_test.sh tests/integration/experiments/

tests/integration/__init__.py

+36
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,8 @@ def get_unsupported_lower_protocol():
299299
This is used to determine the lowest protocol version that is NOT
300300
supported by the version of C* running
301301
"""
302+
if SCYLLA_VERSION is not None:
303+
return 2
302304
if CASSANDRA_VERSION >= Version('3.0'):
303305
return 2
304306
else:
@@ -310,6 +312,8 @@ def get_unsupported_upper_protocol():
310312
This is used to determine the highest protocol version that is NOT
311313
supported by the version of C* running
312314
"""
315+
if SCYLLA_VERSION is not None:
316+
return 5
313317

314318
if CASSANDRA_VERSION >= Version('4.0-a'):
315319
if DSE_VERSION:
@@ -819,6 +823,38 @@ def setup_keyspace(ipformat=None, wait=True, protocol_version=None, port=9042):
819823
cluster.shutdown()
820824

821825

826+
def is_scylla_enterprise(version: Version) -> bool:
827+
return version > Version('2000.1.1')
828+
829+
830+
def xfail_scylla_version_lt(reason, oss_scylla_version, ent_scylla_version, *args, **kwargs):
831+
"""
832+
It is used to mark tests that are going to fail on certain scylla versions.
833+
:param reason: message to fail test with
834+
:param oss_scylla_version: str, oss version from which test supposed to succeed
835+
:param ent_scylla_version: str, enterprise version from which test supposed to succeed. It should end with `.1.1`
836+
"""
837+
if not reason.startswith("scylladb/scylladb#"):
838+
raise ValueError('reason should start with scylladb/scylladb#<issue-id> to reference issue in scylla repo')
839+
840+
if not isinstance(ent_scylla_version, str):
841+
raise ValueError('ent_scylla_version should be a str')
842+
843+
if not ent_scylla_version.endswith("1.1"):
844+
raise ValueError('ent_scylla_version should end with "1.1"')
845+
846+
if SCYLLA_VERSION is None:
847+
return pytest.mark.skipif(False, reason="It is just a NoOP Decor, should not skip anything")
848+
849+
current_version = Version(get_scylla_version(SCYLLA_VERSION))
850+
851+
if is_scylla_enterprise(current_version):
852+
return pytest.mark.xfail(current_version < Version(ent_scylla_version),
853+
reason=reason, *args, **kwargs)
854+
855+
return pytest.mark.xfail(current_version < Version(oss_scylla_version), reason=reason, *args, **kwargs)
856+
857+
822858
class UpDownWaiter(object):
823859

824860
def __init__(self, host):

tests/integration/cqlengine/management/test_management.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,15 @@
2323
from cassandra.cqlengine.models import Model
2424
from cassandra.cqlengine import columns
2525

26-
from tests.integration import DSE_VERSION, PROTOCOL_VERSION, greaterthancass20, requires_collection_indexes, MockLoggingHandler, CASSANDRA_VERSION
26+
from tests.integration import DSE_VERSION, PROTOCOL_VERSION, greaterthancass20, requires_collection_indexes, \
27+
MockLoggingHandler, CASSANDRA_VERSION, SCYLLA_VERSION, xfail_scylla
2728
from tests.integration.cqlengine.base import BaseCassEngTestCase
2829
from tests.integration.cqlengine.query.test_queryset import TestModel
2930
from cassandra.cqlengine.usertype import UserType
3031
from tests.integration.cqlengine import DEFAULT_KEYSPACE
3132

3233

33-
INCLUDE_REPAIR = not CASSANDRA_VERSION >= Version('4-a') # This should cover DSE 6.0+
34+
INCLUDE_REPAIR = (not CASSANDRA_VERSION >= Version('4-a')) and SCYLLA_VERSION is None # This should cover DSE 6.0+
3435

3536

3637
class KeyspaceManagementTest(BaseCassEngTestCase):
@@ -429,6 +430,7 @@ def test_sync_index_case_sensitive(self):
429430

430431
@greaterthancass20
431432
@requires_collection_indexes
433+
@xfail_scylla("scylladb/scylladb#22019 - Scylla incorrectly reports target as keys(%s) for sets")
432434
def test_sync_indexed_set(self):
433435
"""
434436
Tests that models that have container types with indices can be synced.

tests/integration/standard/test_cluster.py

-1
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,6 @@ def test_protocol_negotiation(self):
288288

289289
cluster.shutdown()
290290

291-
@xfail_scylla("Failing with scylla because there is option to create a cluster with 'lower bound' protocol")
292291
def test_invalid_protocol_negotation(self):
293292
"""
294293
Test for protocol negotiation when explicit versions are set

tests/integration/standard/test_metadata.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
greaterthancass21, assert_startswith, greaterthanorequalcass40,
4343
greaterthanorequaldse67, lessthancass40,
4444
TestCluster, DSE_VERSION, requires_java_udf, requires_composite_type,
45-
requires_collection_indexes, SCYLLA_VERSION)
45+
requires_collection_indexes, SCYLLA_VERSION, xfail_scylla, xfail_scylla_version_lt)
4646

4747
from tests.util import wait_until
4848

@@ -505,6 +505,7 @@ def test_indexes(self):
505505

506506
@greaterthancass21
507507
@requires_collection_indexes
508+
@xfail_scylla('scylladb/scylladb#22013 - scylla does not show full index in system_schema.indexes')
508509
def test_collection_indexes(self):
509510

510511
self.session.execute("CREATE TABLE %s.%s (a int PRIMARY KEY, b map<text, text>)"
@@ -1207,7 +1208,8 @@ def test_export_keyspace_schema_udts(self):
12071208
cluster.shutdown()
12081209

12091210
@greaterthancass21
1210-
@pytest.mark.xfail(reason='Column name in CREATE INDEX is not quoted. It\'s a bug in driver or in Scylla')
1211+
@xfail_scylla_version_lt(reason='scylladb/scylladb#10707 - Column name in CREATE INDEX is not quoted',
1212+
oss_scylla_version="5.2", ent_scylla_version="2023.1.1")
12111213
def test_case_sensitivity(self):
12121214
"""
12131215
Test that names that need to be escaped in CREATE statements are

0 commit comments

Comments
 (0)