test/cql-pytest: test_tombstone_limit.py: re-enable disabled tests

The tests in this file, that are related to partition-scans are failing
with tablets, and were hence disabled with xfail_tablets. This means we
are loosing test coverage, so parametrize these tests to run with both
vnodes and tablets, and targetedly mark as xfail only when running with
tablets.
This commit is contained in:
Botond Dénes
2024-01-23 07:13:53 -05:00
parent 3527d0aaed
commit dcaf308a59

View File

@@ -247,8 +247,11 @@ def check_pages_many_partitions(results, expected):
assert p == expected_pages.get(i, [])
# xfail_tablets due to https://github.com/scylladb/scylladb/issues/16486
def test_partition_tombstone_prefix(cql, test_keyspace, lowered_tombstone_limit, driver_bug_1, xfail_tablets):
# xfail with tablets due to https://github.com/scylladb/scylladb/issues/16486
@pytest.mark.parametrize("test_keyspace",
[pytest.param("tablets", marks=[pytest.mark.xfail(reason="issue #16486")]), "vnodes"],
indirect=True)
def test_partition_tombstone_prefix(cql, test_keyspace, lowered_tombstone_limit, driver_bug_1):
with new_test_table(cql, test_keyspace, 'pk int, ck int, v int, PRIMARY KEY (pk, ck)') as table:
insert_row_id = cql.prepare(f"INSERT INTO {table} (pk, ck, v) VALUES (?, ?, ?)")
delete_partition_id = cql.prepare(f"DELETE FROM {table} WHERE pk = ?")
@@ -268,8 +271,10 @@ def test_partition_tombstone_prefix(cql, test_keyspace, lowered_tombstone_limit,
check_pages_many_partitions(cql.execute(statement), {-1: all_pks[-1]})
# xfail_tablets due to https://github.com/scylladb/scylladb/issues/16486
def test_partition_tombstone_span(cql, test_keyspace, lowered_tombstone_limit, driver_bug_1, xfail_tablets):
@pytest.mark.parametrize("test_keyspace",
[pytest.param("tablets", marks=[pytest.mark.xfail(reason="issue #16486")]), "vnodes"],
indirect=True)
def test_partition_tombstone_span(cql, test_keyspace, lowered_tombstone_limit, driver_bug_1):
with new_test_table(cql, test_keyspace, 'pk int, ck int, v int, PRIMARY KEY (pk, ck)') as table:
insert_row_id = cql.prepare(f"INSERT INTO {table} (pk, ck, v) VALUES (?, ?, ?)")
delete_partition_id = cql.prepare(f"DELETE FROM {table} WHERE pk = ?")
@@ -289,8 +294,10 @@ def test_partition_tombstone_span(cql, test_keyspace, lowered_tombstone_limit, d
check_pages_many_partitions(cql.execute(statement), {0: all_pks[0], -1: all_pks[-1]})
# xfail_tablets due to https://github.com/scylladb/scylladb/issues/16486
def test_static_row_tombstone_prefix(cql, test_keyspace, lowered_tombstone_limit, driver_bug_1, xfail_tablets):
@pytest.mark.parametrize("test_keyspace",
[pytest.param("tablets", marks=[pytest.mark.xfail(reason="issue #16486")]), "vnodes"],
indirect=True)
def test_static_row_tombstone_prefix(cql, test_keyspace, lowered_tombstone_limit, driver_bug_1):
with new_test_table(cql, test_keyspace, 'pk int, ck int, v int, s int static, PRIMARY KEY (pk, ck)') as table:
upsert_row_id = cql.prepare(f"UPDATE {table} SET s = ? WHERE pk = ?")
delete_partition_id = cql.prepare(f"DELETE FROM {table} WHERE pk = ?")
@@ -310,8 +317,10 @@ def test_static_row_tombstone_prefix(cql, test_keyspace, lowered_tombstone_limit
check_pages_many_partitions(cql.execute(statement), {-1: all_pks[-1]})
# xfail_tablets due to https://github.com/scylladb/scylladb/issues/16486
def test_static_row_tombstone_span(cql, test_keyspace, lowered_tombstone_limit, driver_bug_1, xfail_tablets):
@pytest.mark.parametrize("test_keyspace",
[pytest.param("tablets", marks=[pytest.mark.xfail(reason="issue #16486")]), "vnodes"],
indirect=True)
def test_static_row_tombstone_span(cql, test_keyspace, lowered_tombstone_limit, driver_bug_1):
with new_test_table(cql, test_keyspace, 'pk int, ck int, v int, s int static, PRIMARY KEY (pk, ck)') as table:
upsert_row_id = cql.prepare(f"UPDATE {table} SET s = ? WHERE pk = ?")
delete_partition_id = cql.prepare(f"DELETE FROM {table} WHERE pk = ?")