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 , xfail_scylla , xfail_scylla_version_lt )
45+ requires_collection_indexes , SCYLLA_VERSION , xfail_scylla , xfail_scylla_version_lt ,
46+ scylla_only )
4647
4748from tests .util import wait_until
4849
@@ -1279,13 +1280,13 @@ def test_already_exists_exceptions(self):
12791280 cluster .shutdown ()
12801281
12811282 @local
1282- @pytest .mark .xfail (reason = 'AssertionError: \' RAC1\' != \' r1\' - probably a bug in driver or in Scylla' )
12831283 def test_replicas (self ):
12841284 """
12851285 Ensure cluster.metadata.get_replicas return correctly when not attached to keyspace
12861286 """
12871287 if murmur3 is None :
12881288 raise unittest .SkipTest ('the murmur3 extension is not available' )
1289+ is_scylla = isinstance (get_cluster (), ScyllaCluster )
12891290
12901291 cluster = TestCluster ()
12911292 self .assertEqual (cluster .metadata .get_replicas ('test3rf' , 'key' ), [])
@@ -1295,7 +1296,7 @@ def test_replicas(self):
12951296 self .assertNotEqual (list (cluster .metadata .get_replicas ('test3rf' , b'key' )), [])
12961297 host = list (cluster .metadata .get_replicas ('test3rf' , b'key' ))[0 ]
12971298 self .assertEqual (host .datacenter , 'dc1' )
1298- self .assertEqual (host .rack , 'r1' )
1299+ self .assertEqual (host .rack , 'RAC1' if is_scylla else ' r1' )
12991300 cluster .shutdown ()
13001301
13011302 def test_token_map (self ):
@@ -1334,7 +1335,7 @@ def test_token(self):
13341335 self .assertEqual (expected_node_count , len (tmap .ring ))
13351336 cluster .shutdown ()
13361337
1337-
1338+ @ scylla_only # this is scylla only, since the metadata timeout feature doesn't cover peers_v2 queries that is used by cassandra
13381339class MetadataTimeoutTest (unittest .TestCase ):
13391340 """
13401341 Test of TokenMap creation and other behavior.
0 commit comments