From 6448f31f477e8a15ba44955983d5f5881e4bec05 Mon Sep 17 00:00:00 2001 From: Vladilen Muzychenko Date: Fri, 8 Aug 2025 16:38:40 +0000 Subject: [PATCH] Add possibility to skip tests --- ydb/tests/olap/scenario/helpers/__init__.py | 1 + ydb/tests/olap/scenario/helpers/skip_test.py | 10 ++++++++++ ydb/tests/olap/scenario/helpers/ya.make | 1 + ydb/tests/olap/scenario/test_alter_tiering.py | 3 +++ 4 files changed, 15 insertions(+) create mode 100644 ydb/tests/olap/scenario/helpers/skip_test.py diff --git a/ydb/tests/olap/scenario/helpers/__init__.py b/ydb/tests/olap/scenario/helpers/__init__.py index 8e7812a53037..0eb7e4dab005 100644 --- a/ydb/tests/olap/scenario/helpers/__init__.py +++ b/ydb/tests/olap/scenario/helpers/__init__.py @@ -2,3 +2,4 @@ from .data_generators import * # noqa from .drop_helper import * # noqa from .table_helper import * # noqa +from .skip_test import * # noqa diff --git a/ydb/tests/olap/scenario/helpers/skip_test.py b/ydb/tests/olap/scenario/helpers/skip_test.py new file mode 100644 index 000000000000..1a4119b8131a --- /dev/null +++ b/ydb/tests/olap/scenario/helpers/skip_test.py @@ -0,0 +1,10 @@ +import pytest +from ydb.tests.olap.scenario.helpers import TestContext +from ydb.tests.olap.lib.utils import get_external_param + + +def check_test_for_skipping(ctx: TestContext): + current_test = f"{ctx.suite}::{ctx.test}" + skipped_tests = get_external_param('olap-skip', '').split(',') + if current_test != '' and current_test in skipped_tests: + pytest.skip("marked as skipped in params") diff --git a/ydb/tests/olap/scenario/helpers/ya.make b/ydb/tests/olap/scenario/helpers/ya.make index f97b1f294e6c..d1842b364885 100644 --- a/ydb/tests/olap/scenario/helpers/ya.make +++ b/ydb/tests/olap/scenario/helpers/ya.make @@ -6,6 +6,7 @@ PY3_LIBRARY() data_generators.py table_helper.py drop_helper.py + skip_test.py ) PEERDIR( diff --git a/ydb/tests/olap/scenario/test_alter_tiering.py b/ydb/tests/olap/scenario/test_alter_tiering.py index 4c9c9359304f..a28d57b0717f 100644 --- a/ydb/tests/olap/scenario/test_alter_tiering.py +++ b/ydb/tests/olap/scenario/test_alter_tiering.py @@ -6,6 +6,7 @@ CreateTableStore, DropTable, DropTableStore, + skip_test, ) from ydb.tests.olap.common.thread_helper import TestThread, TestThreads from helpers.tiering_helper import ( @@ -299,6 +300,8 @@ def _loop_add_drop_column(self, ctx: TestContext, store: str, duration: datetime sth.execute_scheme_query(AlterTableStore(store).drop_column(column_name), retries=2) def scenario_many_tables(self, ctx: TestContext): + skip_test.check_test_for_skipping(ctx) + self._setup_tiering_test(ctx) self.test_duration = self._get_test_duration(get_external_param('test-class', 'SMALL'))