26
26
27
27
from cassandra import AlreadyExists , SignatureDescriptor , UserFunctionDescriptor , UserAggregateDescriptor
28
28
from cassandra .connection import Connection
29
-
30
29
from cassandra .encoder import Encoder
31
30
from cassandra .metadata import (IndexMetadata , Token , murmur3 , Function , Aggregate , protect_name , protect_names ,
32
31
RegisteredTableExtension , _RegisteredExtensionType , get_schema_parser ,
33
32
group_keys_by_replica , NO_VALID_REPLICA )
34
33
from cassandra .protocol import QueryMessage , ProtocolHandler
35
34
from cassandra .util import SortedSet
35
+ from ccmlib .scylla_cluster import ScyllaCluster
36
36
37
37
from tests .integration import (get_cluster , use_singledc , PROTOCOL_VERSION , execute_until_pass ,
38
38
BasicSegregatedKeyspaceUnitTestCase , BasicSharedKeyspaceUnitTestCase ,
42
42
greaterthancass21 , assert_startswith , greaterthanorequalcass40 ,
43
43
greaterthanorequaldse67 , lessthancass40 ,
44
44
TestCluster , DSE_VERSION , requires_java_udf , requires_composite_type ,
45
- requires_collection_indexes , SCYLLA_VERSION )
45
+ requires_collection_indexes , SCYLLA_VERSION , xfail_scylla , scylla_only )
46
46
47
47
from tests .util import wait_until
48
48
@@ -1207,7 +1207,7 @@ def test_export_keyspace_schema_udts(self):
1207
1207
cluster .shutdown ()
1208
1208
1209
1209
@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' )
1211
1211
def test_case_sensitivity (self ):
1212
1212
"""
1213
1213
Test that names that need to be escaped in CREATE statements are
@@ -1277,13 +1277,13 @@ def test_already_exists_exceptions(self):
1277
1277
cluster .shutdown ()
1278
1278
1279
1279
@local
1280
- @pytest .mark .xfail (reason = 'AssertionError: \' RAC1\' != \' r1\' - probably a bug in driver or in Scylla' )
1281
1280
def test_replicas (self ):
1282
1281
"""
1283
1282
Ensure cluster.metadata.get_replicas return correctly when not attached to keyspace
1284
1283
"""
1285
1284
if murmur3 is None :
1286
1285
raise unittest .SkipTest ('the murmur3 extension is not available' )
1286
+ is_scylla = isinstance (get_cluster (), ScyllaCluster )
1287
1287
1288
1288
cluster = TestCluster ()
1289
1289
self .assertEqual (cluster .metadata .get_replicas ('test3rf' , 'key' ), [])
@@ -1293,7 +1293,7 @@ def test_replicas(self):
1293
1293
self .assertNotEqual (list (cluster .metadata .get_replicas ('test3rf' , b'key' )), [])
1294
1294
host = list (cluster .metadata .get_replicas ('test3rf' , b'key' ))[0 ]
1295
1295
self .assertEqual (host .datacenter , 'dc1' )
1296
- self .assertEqual (host .rack , 'r1' )
1296
+ self .assertEqual (host .rack , 'RAC1' if is_scylla else ' r1' )
1297
1297
cluster .shutdown ()
1298
1298
1299
1299
def test_token_map (self ):
@@ -1332,7 +1332,7 @@ def test_token(self):
1332
1332
self .assertEqual (expected_node_count , len (tmap .ring ))
1333
1333
cluster .shutdown ()
1334
1334
1335
-
1335
+ @ scylla_only
1336
1336
class MetadataTimeoutTest (unittest .TestCase ):
1337
1337
"""
1338
1338
Test of TokenMap creation and other behavior.
0 commit comments