4545 lessthancass40 ,
4646 TestCluster , requires_java_udf , requires_composite_type ,
4747 requires_collection_indexes , SCYLLA_VERSION , xfail_scylla , xfail_scylla_version_lt ,
48- requirescompactstorage )
48+ requirescompactstorage , get_tablets_disabled_ddl_suffix , execute_with_long_wait_retry )
4949
5050from tests .util import wait_until , assertRegex , assertDictEqual , assertListEqual , assert_startswith_diff
5151
@@ -141,6 +141,12 @@ def test_bad_contact_point(self):
141141
142142class SchemaMetadataTests (BasicSegregatedKeyspaceUnitTestCase ):
143143
144+ @classmethod
145+ def create_keyspace (cls , rf ):
146+ ddl = "CREATE KEYSPACE {0} WITH replication = {{'class': 'NetworkTopologyStrategy', 'replication_factor': '{1}'}}{2}" .format (
147+ cls .ks_name , rf , get_tablets_disabled_ddl_suffix ())
148+ execute_with_long_wait_retry (cls .session , ddl )
149+
144150 def test_schema_metadata_disable (self ):
145151 """
146152 Checks to ensure that schema metadata_enabled, and token_metadata_enabled
@@ -448,8 +454,6 @@ def test_dense_compact_storage(self):
448454 tablemeta = self .get_table_metadata ()
449455 self .check_create_statement (tablemeta , create_statement )
450456
451- @xfail_scylla_version_lt (reason = 'scylladb/scylladb#22677 - Counters are not yet supported with tablets' ,
452- scylla_version = "2026.1" )
453457 def test_counter (self ):
454458 create_statement = (
455459 "CREATE TABLE {keyspace}.{table} ("
@@ -724,8 +728,6 @@ def test_refresh_table_metadata(self):
724728 cluster2 .shutdown ()
725729
726730 @greaterthanorequalcass30
727- @xfail_scylla_version_lt (reason = 'scylladb/scylladb#22677 - Secondary indexes are not supported on base tables with tablets' ,
728- scylla_version = "2026.1" )
729731 def test_refresh_metadata_for_mv (self ):
730732 """
731733 test for synchronously refreshing materialized view metadata
@@ -935,8 +937,6 @@ def test_refresh_user_aggregate_metadata(self):
935937
936938 @greaterthanorequalcass30
937939 @requires_collection_indexes
938- @xfail_scylla_version_lt (reason = 'scylladb/scylladb#22677 - Secondary indexes are not supported on base tables with tablets' ,
939- scylla_version = "2026.1" )
940940 def test_multiple_indices (self ):
941941 """
942942 test multiple indices on the same column.
@@ -970,8 +970,6 @@ def test_multiple_indices(self):
970970 assert index_2 .keyspace_name == "schemametadatatests"
971971
972972 @greaterthanorequalcass30
973- @xfail_scylla_version_lt (reason = 'scylladb/scylladb#22677 - Secondary indexes are not supported on base tables with tablets' ,
974- scylla_version = "2026.1" )
975973 def test_table_extensions (self ):
976974 s = self .session
977975 ks = self .keyspace_name
@@ -1204,8 +1202,6 @@ def test_export_keyspace_schema_udts(self):
12041202 cluster .shutdown ()
12051203
12061204 @greaterthancass21
1207- @xfail_scylla_version_lt (reason = 'scylladb/scylladb#22677 - Secondary indexes are not supported on base tables with tablets' ,
1208- scylla_version = "2026.1" )
12091205 def test_case_sensitivity (self ):
12101206 """
12111207 Test that names that need to be escaped in CREATE statements are
@@ -1218,10 +1214,9 @@ def test_case_sensitivity(self):
12181214 cfname = 'AnInterestingTable'
12191215
12201216 session .execute ("DROP KEYSPACE IF EXISTS {0}" .format (ksname ))
1221- session .execute ("""
1222- CREATE KEYSPACE "%s"
1223- WITH replication = {'class': 'NetworkTopologyStrategy', 'replication_factor': '1'}
1224- """ % (ksname ,))
1217+ session .execute (
1218+ ("CREATE KEYSPACE \" %s\" WITH replication = {'class': 'NetworkTopologyStrategy', 'replication_factor': '1'}" +
1219+ get_tablets_disabled_ddl_suffix ()) % (ksname ,))
12251220 session .execute ("""
12261221 CREATE TABLE "%s"."%s" (
12271222 k int,
@@ -1442,11 +1437,9 @@ def setup_class(cls):
14421437 if cls .keyspace_name in cls .cluster .metadata .keyspaces :
14431438 cls .session .execute ("DROP KEYSPACE %s" % cls .keyspace_name )
14441439
1445- cls .session .execute (
1446- """
1447- CREATE KEYSPACE %s
1448- WITH replication = {'class': 'NetworkTopologyStrategy', 'replication_factor': '1'};
1449- """ % cls .keyspace_name )
1440+ ddl = ("CREATE KEYSPACE %s WITH replication = {'class': 'NetworkTopologyStrategy', 'replication_factor': '1'}" +
1441+ get_tablets_disabled_ddl_suffix ())
1442+ cls .session .execute (ddl % cls .keyspace_name )
14501443 cls .session .set_keyspace (cls .keyspace_name )
14511444 except Exception :
14521445 cls .cluster .shutdown ()
@@ -1465,8 +1458,6 @@ def create_basic_table(self):
14651458 def drop_basic_table (self ):
14661459 self .session .execute ("DROP TABLE %s" % self .table_name )
14671460
1468- @xfail_scylla_version_lt (reason = 'scylladb/scylladb#22677 - Secondary indexes are not supported on base tables with tablets' ,
1469- scylla_version = "2026.1" )
14701461 def test_index_updates (self ):
14711462 self .create_basic_table ()
14721463
@@ -1508,8 +1499,6 @@ def test_index_updates(self):
15081499 assert 'a_idx' not in ks_meta .indexes
15091500 assert 'b_idx' not in ks_meta .indexes
15101501
1511- @xfail_scylla_version_lt (reason = 'scylladb/scylladb#22677 - Secondary indexes are not supported on base tables with tablets' ,
1512- scylla_version = "2026.1" )
15131502 def test_index_follows_alter (self ):
15141503 self .create_basic_table ()
15151504
@@ -2019,7 +2008,8 @@ def setup_class(cls):
20192008 cls .cluster = TestCluster ()
20202009 cls .keyspace_name = cls .__name__ .lower ()
20212010 cls .session = cls .cluster .connect ()
2022- cls .session .execute ("CREATE KEYSPACE %s WITH replication = {'class': 'NetworkTopologyStrategy', 'replication_factor': '1'}" % cls .keyspace_name )
2011+ ddl = "CREATE KEYSPACE %s WITH replication = {'class': 'NetworkTopologyStrategy', 'replication_factor': '1'}" + get_tablets_disabled_ddl_suffix ()
2012+ cls .session .execute (ddl % cls .keyspace_name )
20232013 cls .session .set_keyspace (cls .keyspace_name )
20242014 connection = cls .cluster .control_connection ._connection
20252015
@@ -2051,8 +2041,6 @@ def test_bad_table(self):
20512041 assert m ._exc_info [0 ] is self .BadMetaException
20522042 assert "/*\n Warning:" in m .export_as_string ()
20532043
2054- @xfail_scylla_version_lt (reason = 'scylladb/scylladb#22677 - Secondary indexes are not supported on base tables with tablets' ,
2055- scylla_version = "2026.1" )
20562044 def test_bad_index (self ):
20572045 self .session .execute ('CREATE TABLE %s (k int PRIMARY KEY, v int)' % self .function_name )
20582046 self .session .execute ('CREATE INDEX ON %s(v)' % self .function_name )
@@ -2144,10 +2132,15 @@ def test_dct_alias(self):
21442132
21452133
21462134@greaterthanorequalcass30
2147- @xfail_scylla_version_lt (reason = 'scylladb/scylladb#22677 - Secondary indexes are not supported on base tables with tablets' ,
2148- scylla_version = "2026.1" )
21492135class MaterializedViewMetadataTestSimple (BasicSharedKeyspaceUnitTestCase ):
21502136
2137+ @classmethod
2138+ def create_keyspace (cls , rf ):
2139+ ddl = "CREATE KEYSPACE {0} WITH replication = {{'class': 'NetworkTopologyStrategy', 'replication_factor': '{1}'}}{2}" .format (
2140+ cls .ks_name , rf , get_tablets_disabled_ddl_suffix ())
2141+ execute_with_long_wait_retry (cls .session , ddl )
2142+
2143+
21512144 def setUp (self ):
21522145 self .session .execute ("CREATE TABLE {0}.{1} (pk int PRIMARY KEY, c int)" .format (self .keyspace_name , self .function_table_name ))
21532146 self .session .execute (
@@ -2234,9 +2227,14 @@ def test_materialized_view_metadata_drop(self):
22342227
22352228
22362229@greaterthanorequalcass30
2237- @xfail_scylla_version_lt (reason = 'scylladb/scylladb#22677 - Secondary indexes are not supported on base tables with tablets' ,
2238- scylla_version = "2026.1" )
22392230class MaterializedViewMetadataTestComplex (BasicSegregatedKeyspaceUnitTestCase ):
2231+
2232+ @classmethod
2233+ def create_keyspace (cls , rf ):
2234+ ddl = "CREATE KEYSPACE {0} WITH replication = {{'class': 'NetworkTopologyStrategy', 'replication_factor': '{1}'}}{2}" .format (
2235+ cls .ks_name , rf , get_tablets_disabled_ddl_suffix ())
2236+ execute_with_long_wait_retry (cls .session , ddl )
2237+
22402238 def test_create_view_metadata (self ):
22412239 """
22422240 test to ensure that materialized view metadata is properly constructed
0 commit comments