From f26b31e95073024f5cc55a6afcaaa6119b2750ee Mon Sep 17 00:00:00 2001 From: Nadav Har'El Date: Mon, 24 May 2021 13:03:48 +0300 Subject: [PATCH] test/cql-pytest: mark some tests with scylla-only Tests which are known to test a Scylla-only feature (such as CDC) or to rely on a known and difference between Scylla and Cassandra should be marked "scylla-only", so they are skipped when running the tests against Cassandra (test/cql-pytest/run-cassandra) instead of reporting errors. Signed-off-by: Nadav Har'El --- test/cql-pytest/test_cdc.py | 2 +- test/cql-pytest/test_validation.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/cql-pytest/test_cdc.py b/test/cql-pytest/test_cdc.py index 2bd17fd9ac..836410f3cb 100644 --- a/test/cql-pytest/test_cdc.py +++ b/test/cql-pytest/test_cdc.py @@ -20,7 +20,7 @@ from cassandra.query import SimpleStatement from util import new_test_table -def test_cdc_log_entries_use_cdc_streams(cql, test_keyspace): +def test_cdc_log_entries_use_cdc_streams(scylla_only, cql, test_keyspace): '''Test that the stream IDs chosen for CDC log entries come from the CDC generation whose streams are listed in the streams description table. Since this test is executed on a single-node cluster, there is only one generation.''' diff --git a/test/cql-pytest/test_validation.py b/test/cql-pytest/test_validation.py index 83a4654d76..ef7d5ca070 100644 --- a/test/cql-pytest/test_validation.py +++ b/test/cql-pytest/test_validation.py @@ -158,7 +158,7 @@ good_utf8 = [ # Note that currently, Scylla's UTF-8 parser is stricter than Cassandra's # (see comment above listing the relevant cases), so this test, as all tests # using the bad_utf8 array, will fail on Cassandra. -def test_validation_utf8_as_blob(cql, table1): +def test_validation_utf8_as_blob(scylla_only, cql, table1): cmd = "INSERT INTO {} (k, t) VALUES (1, blobAsText(0x{}))" for b in good_utf8: print(b) @@ -181,7 +181,7 @@ def test_validation_utf8_as_blob(cql, table1): # Note that currently, Scylla's UTF-8 parser is stricter than Cassandra's # (see comment above listing the relevant cases), so this test, as all tests # using the bad_utf8 array, will fail on Cassandra. -def test_validation_utf8_bound_column(cql, table1): +def test_validation_utf8_bound_column(scylla_only, cql, table1): import cassandra.cqltypes orig_serialize = cassandra.cqltypes.UTF8Type.serialize def myserialize(ustr, protocol_version):