26
26
import pytest
27
27
28
28
from cassandra import AlreadyExists , SignatureDescriptor , UserFunctionDescriptor , UserAggregateDescriptor
29
-
29
+ from ccmlib . scylla_cluster import ScyllaCluster
30
30
from cassandra .encoder import Encoder
31
31
from cassandra .metadata import (IndexMetadata , Token , murmur3 , Function , Aggregate , protect_name , protect_names ,
32
32
RegisteredTableExtension , _RegisteredExtensionType , get_schema_parser ,
@@ -1205,7 +1205,7 @@ def test_export_keyspace_schema_udts(self):
1205
1205
cluster .shutdown ()
1206
1206
1207
1207
@greaterthancass21
1208
- @pytest . mark . xfail (reason = 'Column name in CREATE INDEX is not quoted. It\' s a bug in driver or in Scylla' )
1208
+ @xfail_scylla (reason = 'Column name in CREATE INDEX is not quoted. It\' s a bug in driver or in Scylla' )
1209
1209
def test_case_sensitivity (self ):
1210
1210
"""
1211
1211
Test that names that need to be escaped in CREATE statements are
@@ -1275,13 +1275,13 @@ def test_already_exists_exceptions(self):
1275
1275
cluster .shutdown ()
1276
1276
1277
1277
@local
1278
- @pytest .mark .xfail (reason = 'AssertionError: \' RAC1\' != \' r1\' - probably a bug in driver or in Scylla' )
1279
1278
def test_replicas (self ):
1280
1279
"""
1281
1280
Ensure cluster.metadata.get_replicas return correctly when not attached to keyspace
1282
1281
"""
1283
1282
if murmur3 is None :
1284
1283
raise unittest .SkipTest ('the murmur3 extension is not available' )
1284
+ is_scylla = isinstance (get_cluster (), ScyllaCluster )
1285
1285
1286
1286
cluster = TestCluster ()
1287
1287
self .assertEqual (cluster .metadata .get_replicas ('test3rf' , 'key' ), [])
@@ -1291,7 +1291,7 @@ def test_replicas(self):
1291
1291
self .assertNotEqual (list (cluster .metadata .get_replicas ('test3rf' , six .b ('key' ))), [])
1292
1292
host = list (cluster .metadata .get_replicas ('test3rf' , six .b ('key' )))[0 ]
1293
1293
self .assertEqual (host .datacenter , 'dc1' )
1294
- self .assertEqual (host .rack , 'r1' )
1294
+ self .assertEqual (host .rack , 'RAC1' if is_scylla else ' r1' )
1295
1295
cluster .shutdown ()
1296
1296
1297
1297
def test_token_map (self ):
0 commit comments