Skip to content

Commit

Permalink
Added tests counter
Browse files Browse the repository at this point in the history
  • Loading branch information
GrigoriyPA committed Jun 21, 2024
1 parent a3d73ea commit e8fadd8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ydb/tests/fq/s3/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

MOTO_SERVER_PATH = "contrib/python/moto/bin/moto_server"
S3_PID_FILE = "s3.pid"
TESTS_COUNT_LIMIT = 40


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


@pytest.fixture
def client(kikimr, request=None):
def client(request: pytest.FixtureRequest, kikimr):
client.number_tests += 1
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"

client = FederatedQueryClient(request.param["folder_id"]
if request is not None
else "my_folder",
Expand All @@ -132,6 +136,8 @@ def client(kikimr, request=None):
kikimr.control_plane.ensure_is_alive()
kikimr.compute_plane.ensure_is_alive()

client.number_tests = 0


@pytest.fixture
def unique_prefix(request: pytest.FixtureRequest):
Expand Down
1 change: 1 addition & 0 deletions ydb/tests/fq/s3/ya.make
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
PY3TEST()

FORK_TEST_FILES()
FORK_TESTS()

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

Expand Down

0 comments on commit e8fadd8

Please sign in to comment.