Skip to content

Commit ac140e1

Browse files
committed
tests: mark test which are scylla specific
those test can't be run ontop of cassandra and we should mark them in a why we can skip them
1 parent 3d4e6f6 commit ac140e1

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

tests/integration/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,7 @@ def _id_and_mark(f):
391391
reason='Scylla does not support custom payloads. Cassandra requires native protocol v4.0+')
392392
xfail_scylla = lambda reason, *args, **kwargs: pytest.mark.xfail(SCYLLA_VERSION is not None, reason=reason, *args, **kwargs)
393393
incorrect_test = lambda reason='This test seems to be incorrect and should be fixed', *args, **kwargs: pytest.mark.xfail(reason=reason, *args, **kwargs)
394+
scylla_only = pytest.mark.skipif(SCYLLA_VERSION is None, reason='Scylla only test')
394395

395396
pypy = unittest.skipUnless(platform.python_implementation() == "PyPy", "Test is skipped unless it's on PyPy")
396397
notpy3 = unittest.skipIf(sys.version_info >= (3, 0), "Test not applicable for Python 3.x runtime")

tests/integration/standard/test_scylla_cloud.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from ccmlib.utils.ssl_utils import generate_ssl_stores
55
from ccmlib.utils.sni_proxy import refresh_certs, get_cluster_info, start_sni_proxy, create_cloud_config
66

7-
from tests.integration import use_cluster
7+
from tests.integration import use_cluster, scylla_only
88
from cassandra.cluster import Cluster, TwistedConnection
99

1010

@@ -23,7 +23,7 @@
2323
# need to run them with specific configuration like `gevent.monkey.patch_all()` or under async functions
2424
# unsupported_connection_classes = [GeventConnection, AsyncioConnection, EventletConnection]
2525

26-
26+
@scylla_only
2727
class ScyllaCloudConfigTests(TestCase):
2828
def start_cluster_with_proxy(self):
2929
ccm_cluster = self.ccm_cluster

tests/integration/standard/test_shard_aware.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
from cassandra.policies import TokenAwarePolicy, RoundRobinPolicy, ConstantReconnectionPolicy
3333
from cassandra import OperationTimedOut, ConsistencyLevel
3434

35-
from tests.integration import use_cluster, get_node, PROTOCOL_VERSION
35+
from tests.integration import use_cluster, get_node, PROTOCOL_VERSION, scylla_only
3636

3737
LOGGER = logging.getLogger(__name__)
3838

@@ -42,6 +42,7 @@ def setup_module():
4242
use_cluster('shard_aware', [3], start=True)
4343

4444

45+
@scylla_only
4546
class TestShardAwareIntegration(unittest.TestCase):
4647
@classmethod
4748
def setup_class(cls):

0 commit comments

Comments
 (0)