2626import pytest
2727
2828from cassandra import AlreadyExists , SignatureDescriptor , UserFunctionDescriptor , UserAggregateDescriptor
29-
29+ from ccmlib . scylla_cluster import ScyllaCluster
3030from cassandra .encoder import Encoder
3131from cassandra .metadata import (IndexMetadata , Token , murmur3 , Function , Aggregate , protect_name , protect_names ,
3232 RegisteredTableExtension , _RegisteredExtensionType , get_schema_parser ,
@@ -1205,7 +1205,7 @@ def test_export_keyspace_schema_udts(self):
12051205 cluster .shutdown ()
12061206
12071207 @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' )
12091209 def test_case_sensitivity (self ):
12101210 """
12111211 Test that names that need to be escaped in CREATE statements are
@@ -1275,13 +1275,13 @@ def test_already_exists_exceptions(self):
12751275 cluster .shutdown ()
12761276
12771277 @local
1278- @pytest .mark .xfail (reason = 'AssertionError: \' RAC1\' != \' r1\' - probably a bug in driver or in Scylla' )
12791278 def test_replicas (self ):
12801279 """
12811280 Ensure cluster.metadata.get_replicas return correctly when not attached to keyspace
12821281 """
12831282 if murmur3 is None :
12841283 raise unittest .SkipTest ('the murmur3 extension is not available' )
1284+ is_scylla = isinstance (get_cluster (), ScyllaCluster )
12851285
12861286 cluster = TestCluster ()
12871287 self .assertEqual (cluster .metadata .get_replicas ('test3rf' , 'key' ), [])
@@ -1291,7 +1291,7 @@ def test_replicas(self):
12911291 self .assertNotEqual (list (cluster .metadata .get_replicas ('test3rf' , six .b ('key' ))), [])
12921292 host = list (cluster .metadata .get_replicas ('test3rf' , six .b ('key' )))[0 ]
12931293 self .assertEqual (host .datacenter , 'dc1' )
1294- self .assertEqual (host .rack , 'r1' )
1294+ self .assertEqual (host .rack , 'RAC1' if is_scylla else ' r1' )
12951295 cluster .shutdown ()
12961296
12971297 def test_token_map (self ):
0 commit comments