2626
2727from cassandra import AlreadyExists , SignatureDescriptor , UserFunctionDescriptor , UserAggregateDescriptor
2828from cassandra .connection import Connection
29-
3029from cassandra .encoder import Encoder
3130from cassandra .metadata import (IndexMetadata , Token , murmur3 , Function , Aggregate , protect_name , protect_names ,
3231 RegisteredTableExtension , _RegisteredExtensionType , get_schema_parser ,
3332 group_keys_by_replica , NO_VALID_REPLICA )
3433from cassandra .protocol import QueryMessage , ProtocolHandler
3534from cassandra .util import SortedSet
35+ from ccmlib .scylla_cluster import ScyllaCluster
3636
3737from tests .integration import (get_cluster , use_singledc , PROTOCOL_VERSION , execute_until_pass ,
3838 BasicSegregatedKeyspaceUnitTestCase , BasicSharedKeyspaceUnitTestCase ,
4242 greaterthancass21 , assert_startswith , greaterthanorequalcass40 ,
4343 greaterthanorequaldse67 , lessthancass40 ,
4444 TestCluster , DSE_VERSION , requires_java_udf , requires_composite_type ,
45- requires_collection_indexes , SCYLLA_VERSION )
45+ requires_collection_indexes , SCYLLA_VERSION , xfail_scylla )
4646
4747from tests .util import wait_until
4848
@@ -1207,7 +1207,7 @@ def test_export_keyspace_schema_udts(self):
12071207 cluster .shutdown ()
12081208
12091209 @greaterthancass21
1210- @pytest . mark . xfail (reason = 'Column name in CREATE INDEX is not quoted. It\' s a bug in driver or in Scylla' )
1210+ @xfail_scylla (reason = 'Column name in CREATE INDEX is not quoted. It\' s a bug in driver or in Scylla' )
12111211 def test_case_sensitivity (self ):
12121212 """
12131213 Test that names that need to be escaped in CREATE statements are
@@ -1277,13 +1277,13 @@ def test_already_exists_exceptions(self):
12771277 cluster .shutdown ()
12781278
12791279 @local
1280- @pytest .mark .xfail (reason = 'AssertionError: \' RAC1\' != \' r1\' - probably a bug in driver or in Scylla' )
12811280 def test_replicas (self ):
12821281 """
12831282 Ensure cluster.metadata.get_replicas return correctly when not attached to keyspace
12841283 """
12851284 if murmur3 is None :
12861285 raise unittest .SkipTest ('the murmur3 extension is not available' )
1286+ is_scylla = isinstance (get_cluster (), ScyllaCluster )
12871287
12881288 cluster = TestCluster ()
12891289 self .assertEqual (cluster .metadata .get_replicas ('test3rf' , 'key' ), [])
@@ -1293,7 +1293,7 @@ def test_replicas(self):
12931293 self .assertNotEqual (list (cluster .metadata .get_replicas ('test3rf' , b'key' )), [])
12941294 host = list (cluster .metadata .get_replicas ('test3rf' , b'key' ))[0 ]
12951295 self .assertEqual (host .datacenter , 'dc1' )
1296- self .assertEqual (host .rack , 'r1' )
1296+ self .assertEqual (host .rack , 'RAC1' if is_scylla else ' r1' )
12971297 cluster .shutdown ()
12981298
12991299 def test_token_map (self ):
0 commit comments