Skip to content

Commit

Permalink
tests: mark test which are scylla specific
Browse files Browse the repository at this point in the history
those test can't be run ontop of cassandra
and we should mark them in a why we can skip them
  • Loading branch information
fruch committed Jul 4, 2024
1 parent 3d4e6f6 commit ac140e1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions tests/integration/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,7 @@ def _id_and_mark(f):
reason='Scylla does not support custom payloads. Cassandra requires native protocol v4.0+')
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)
scylla_only = pytest.mark.skipif(SCYLLA_VERSION is None, reason='Scylla only test')

pypy = unittest.skipUnless(platform.python_implementation() == "PyPy", "Test is skipped unless it's on PyPy")
notpy3 = unittest.skipIf(sys.version_info >= (3, 0), "Test not applicable for Python 3.x runtime")
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/standard/test_scylla_cloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from ccmlib.utils.ssl_utils import generate_ssl_stores
from ccmlib.utils.sni_proxy import refresh_certs, get_cluster_info, start_sni_proxy, create_cloud_config

from tests.integration import use_cluster
from tests.integration import use_cluster, scylla_only
from cassandra.cluster import Cluster, TwistedConnection


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


@scylla_only
class ScyllaCloudConfigTests(TestCase):
def start_cluster_with_proxy(self):
ccm_cluster = self.ccm_cluster
Expand Down
3 changes: 2 additions & 1 deletion tests/integration/standard/test_shard_aware.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
from cassandra.policies import TokenAwarePolicy, RoundRobinPolicy, ConstantReconnectionPolicy
from cassandra import OperationTimedOut, ConsistencyLevel

from tests.integration import use_cluster, get_node, PROTOCOL_VERSION
from tests.integration import use_cluster, get_node, PROTOCOL_VERSION, scylla_only

LOGGER = logging.getLogger(__name__)

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


@scylla_only
class TestShardAwareIntegration(unittest.TestCase):
@classmethod
def setup_class(cls):
Expand Down

0 comments on commit ac140e1

Please sign in to comment.