Skip to content

Commit e8fadd8

Browse files
committed
Added tests counter
1 parent a3d73ea commit e8fadd8

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

ydb/tests/fq/s3/conftest.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525

2626
MOTO_SERVER_PATH = "contrib/python/moto/bin/moto_server"
2727
S3_PID_FILE = "s3.pid"
28+
TESTS_COUNT_LIMIT = 40
2829

2930

3031
@pytest.fixture(scope="module")
@@ -122,7 +123,10 @@ def kikimr(yq_version: str, kikimr_yqv1, kikimr_yqv2):
122123

123124

124125
@pytest.fixture
125-
def client(kikimr, request=None):
126+
def client(request: pytest.FixtureRequest, kikimr):
127+
client.number_tests += 1
128+
assert client.number_tests <= TESTS_COUNT_LIMIT, f"Number tests in one class {request.cls} exceeded limit in {TESTS_COUNT_LIMIT} tests, this may lead timeouts on CI, please split this class"
129+
126130
client = FederatedQueryClient(request.param["folder_id"]
127131
if request is not None
128132
else "my_folder",
@@ -132,6 +136,8 @@ def client(kikimr, request=None):
132136
kikimr.control_plane.ensure_is_alive()
133137
kikimr.compute_plane.ensure_is_alive()
134138

139+
client.number_tests = 0
140+
135141

136142
@pytest.fixture
137143
def unique_prefix(request: pytest.FixtureRequest):

ydb/tests/fq/s3/ya.make

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
PY3TEST()
22

33
FORK_TEST_FILES()
4+
FORK_TESTS()
45

56
INCLUDE(${ARCADIA_ROOT}/ydb/tests/tools/fq_runner/ydb_runner_with_datastreams.inc)
67

0 commit comments

Comments
 (0)