Skip to content

Commit 75f3c99

Browse files
VladilenPavelEfarinov
authored andcommitted
Add possibility to skip tests (ydb-platform#22616)
1 parent 086e356 commit 75f3c99

File tree

4 files changed

+15
-0
lines changed

4 files changed

+15
-0
lines changed

ydb/tests/olap/scenario/helpers/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
from .data_generators import * # noqa
33
from .drop_helper import * # noqa
44
from .table_helper import * # noqa
5+
from .skip_test import * # noqa
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import pytest
2+
from ydb.tests.olap.scenario.helpers import TestContext
3+
from ydb.tests.olap.lib.utils import get_external_param
4+
5+
6+
def check_test_for_skipping(ctx: TestContext):
7+
current_test = f"{ctx.suite}::{ctx.test}"
8+
skipped_tests = get_external_param('olap-skip', '').split(',')
9+
if current_test != '' and current_test in skipped_tests:
10+
pytest.skip("marked as skipped in params")

ydb/tests/olap/scenario/helpers/ya.make

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ PY3_LIBRARY()
66
data_generators.py
77
table_helper.py
88
drop_helper.py
9+
skip_test.py
910
)
1011

1112
PEERDIR(

ydb/tests/olap/scenario/test_alter_tiering.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
CreateTableStore,
77
DropTable,
88
DropTableStore,
9+
skip_test,
910
)
1011
from ydb.tests.olap.common.thread_helper import TestThread, TestThreads
1112
from helpers.tiering_helper import (
@@ -299,6 +300,8 @@ def _loop_add_drop_column(self, ctx: TestContext, store: str, duration: datetime
299300
sth.execute_scheme_query(AlterTableStore(store).drop_column(column_name), retries=2)
300301

301302
def scenario_many_tables(self, ctx: TestContext):
303+
skip_test.check_test_for_skipping(ctx)
304+
302305
self._setup_tiering_test(ctx)
303306

304307
self.test_duration = self._get_test_duration(get_external_param('test-class', 'SMALL'))

0 commit comments

Comments
 (0)