|
43 | 43 | from cassandra import ProtocolVersion
|
44 | 44 |
|
45 | 45 | try:
|
| 46 | + import ccmlib |
46 | 47 | from ccmlib.dse_cluster import DseCluster
|
47 | 48 | from ccmlib.cluster import Cluster as CCMCluster
|
48 | 49 | from ccmlib.scylla_cluster import ScyllaCluster as CCMScyllaCluster
|
@@ -97,6 +98,12 @@ def get_server_versions():
|
97 | 98 | return (cass_version, cql_version)
|
98 | 99 |
|
99 | 100 |
|
| 101 | +def get_scylla_version(scylla_ccm_version_string): |
| 102 | + """ get scylla version from ccm before starting a cluster""" |
| 103 | + ccm_repo_cache_dir, _ = ccmlib.scylla_repository.setup(version=scylla_ccm_version_string) |
| 104 | + return ccmlib.common.get_version_from_build(ccm_repo_cache_dir) |
| 105 | + |
| 106 | + |
100 | 107 | def _tuple_version(version_string):
|
101 | 108 | if '-' in version_string:
|
102 | 109 | version_string = version_string[:version_string.index('-')]
|
@@ -372,9 +379,8 @@ def _id_and_mark(f):
|
372 | 379 | # 1. unittest doesn't skip setUpClass when used on class and we need it sometimes
|
373 | 380 | # 2. unittest doesn't have conditional xfail, and I prefer to use pytest than custom decorator
|
374 | 381 | # 3. unittest doesn't have a reason argument, so you don't see the reason in pytest report
|
375 |
| -# TODO remove second check when we stop using unstable version in CI for tablets |
376 |
| -requires_collection_indexes = pytest.mark.skipif(SCYLLA_VERSION is not None and (len(SCYLLA_VERSION.split('/')) != 0 or Version(SCYLLA_VERSION.split(':')[1]) < Version('5.2')), |
377 |
| - reason='Scylla supports collection indexes from 5.2 onwards') |
| 382 | +requires_collection_indexes = pytest.mark.skipif(SCYLLA_VERSION is not None and Version(get_scylla_version(SCYLLA_VERSION)) < Version('5.2'), |
| 383 | + reason='Scylla supports collection indexes from 5.2 onwards') |
378 | 384 | requires_custom_indexes = pytest.mark.skipif(SCYLLA_VERSION is not None,
|
379 | 385 | reason='Scylla does not support SASI or any other CUSTOM INDEX class')
|
380 | 386 | requires_java_udf = pytest.mark.skipif(SCYLLA_VERSION is not None,
|
|
0 commit comments