From b659dfcbe9640c823ea0a13f0505d4e7c439d07a Mon Sep 17 00:00:00 2001 From: Nadav Har'El Date: Tue, 30 Sep 2025 17:27:21 +0300 Subject: [PATCH] test/cqlpy: comment out Cassandra check that is no longer relevant In the test translated from Cassandra validation/operations/alter_test.py we had two lines in the beginning of an unrelated test that verified that CREATE KEYSPACE is not allowed without replication parameters. But starting recently, ScyllaDB does have defaults and does allow these CREATE KEYSPACE. So comment out these two test lines. We didn't notice that this test started to fail, because it was already marked xfail, because in the main part of this test, it reproduces a different issue! The annoying side-affect of these no-longer-passing checks was that because the test expected a CREATE KEYSPACE to fail, it didn't bother to delete this keyspace when it finished, which causes test.py to report that there's a problem because some keyspaces still exist at the end of the test. Now that we fixed this problem, we no longer need to list this test in test/cqlpy/suite.yaml as a test that leaves behind undeleted keyspaces. Fixes #26292 Signed-off-by: Nadav Har'El Closes scylladb/scylladb#26341 --- .../cassandra_tests/validation/operations/alter_test.py | 8 +++++--- test/cqlpy/suite.yaml | 1 - 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/test/cqlpy/cassandra_tests/validation/operations/alter_test.py b/test/cqlpy/cassandra_tests/validation/operations/alter_test.py index 0af680aea3..f9383c5568 100644 --- a/test/cqlpy/cassandra_tests/validation/operations/alter_test.py +++ b/test/cqlpy/cassandra_tests/validation/operations/alter_test.py @@ -163,11 +163,13 @@ def testAlterIndexInterval(cql, test_keyspace): assert options['max_index_interval'] == 512 # Migrated from cql_tests.py:TestCQL.create_alter_options_test() -# Reproduces #9929 +# Reproduces #9935 @pytest.mark.xfail(reason="Issue #9935") def testCreateAlterKeyspaces(cql, test_keyspace, this_dc): - assert_invalid_throw(cql, test_keyspace, SyntaxException, "CREATE KEYSPACE ks1") - assert_invalid_throw(cql, test_keyspace, ConfigurationException, "CREATE KEYSPACE ks1 WITH replication= { 'replication_factor' : 1 }") + # ScyllaDB allows default parameters on CREATE KEYSPACE, so these checks + # are no longer valid: + #assert_invalid_throw(cql, test_keyspace, SyntaxException, "CREATE KEYSPACE ks1") + #assert_invalid_throw(cql, test_keyspace, ConfigurationException, "CREATE KEYSPACE ks1 WITH replication= { 'replication_factor' : 1 }") with create_keyspace(cql, "replication={ 'class' : 'SimpleStrategy', 'replication_factor' : 1 }") as ks1: with create_keyspace(cql, "replication={ 'class' : 'SimpleStrategy', 'replication_factor' : 1 } AND durable_writes=false") as ks2: diff --git a/test/cqlpy/suite.yaml b/test/cqlpy/suite.yaml index 1712d30c1d..302a4306d8 100644 --- a/test/cqlpy/suite.yaml +++ b/test/cqlpy/suite.yaml @@ -3,7 +3,6 @@ pool_size: 4 dirties_cluster: - test_native_transport - test_describe # Broke CQL connections for next tests - - cassandra_tests/validation/operations/alter_test # Do not clean keyspaces after test that might affect next tests extra_scylla_cmdline_options: - '--rf-rack-valid-keyspaces=1' - '--experimental-features=udf'