From b10028e5564a35d5267d0cc08343fc123a41f95e Mon Sep 17 00:00:00 2001 From: Artsiom Mishuta Date: Wed, 1 Apr 2026 12:35:37 +0200 Subject: [PATCH] test: migrate runtime pytest.skip() to typed skip_bug() Migrate 2 runtime pytest.skip() calls referencing known bugs to use the typed skip_bug() wrapper from test.pylib.skip_types: - test/alternator/test_ttl.py: Streams on tablets (#23838) - test/scylla_gdb/test_task_commands.py: coroutine task not found (#22501) --- test/alternator/test_ttl.py | 8 +++++++- test/scylla_gdb/test_task_commands.py | 3 ++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/test/alternator/test_ttl.py b/test/alternator/test_ttl.py index efbf55a6ac..999eae12c5 100644 --- a/test/alternator/test_ttl.py +++ b/test/alternator/test_ttl.py @@ -13,7 +13,7 @@ from decimal import Decimal import pytest from botocore.exceptions import ClientError -from test.pylib.skip_types import skip_env +from test.pylib.skip_types import skip_bug, skip_env from .util import new_test_table, random_string, full_query, unique_table_name, is_aws, client_no_transform, multiset, scylla_config_read # The following fixture is to ensure that Alternator TTL is being tested with both vnodes and tablets. @@ -656,6 +656,12 @@ def test_ttl_expiration_lsi_key(dynamodb, waits_for_expiration): # content), and a special userIdentity flag saying that this is not a regular # REMOVE but an expiration. Reproduces issue #11523. def test_ttl_expiration_streams(dynamodb, dynamodbstreams, waits_for_expiration): + # Alternator Streams currently doesn't work with tablets, so until + # #23838 is solved, skip this test on tablets. + for tag in TAGS: + if tag['Key'] == 'system:initial_tablets' and tag['Value'].isdigit(): + skip_bug("Streams test skipped on tablets due to #23838") + # In my experiments, a 30-minute (1800 seconds) is the typical # expiration delay in this test. If the test doesn't finish within # max_duration, we report a failure. diff --git a/test/scylla_gdb/test_task_commands.py b/test/scylla_gdb/test_task_commands.py index 0e069dbf06..353646ea70 100644 --- a/test/scylla_gdb/test_task_commands.py +++ b/test/scylla_gdb/test_task_commands.py @@ -8,6 +8,7 @@ Each only checks that the command does not fail - but not what it does or return import pytest +from test.pylib.skip_types import skip_bug from test.scylla_gdb.conftest import execute_gdb_command pytestmark = [ @@ -34,7 +35,7 @@ def test_coroutine_frame(gdb_cmd): ) if "COROUTINE_NOT_FOUND" in result.stdout: # See https://github.com/scylladb/scylladb/issues/22501 - pytest.skip("Failed to find coroutine task. Skipping test.") + skip_bug("Failed to find coroutine task. Skipping test. https://github.com/scylladb/scylladb/issues/22501") assert result.returncode == 0, ( f"GDB command `coro_frame` failed. stdout: {result.stdout} stderr: {result.stderr}" )