Skip to content

Commit de53af3

Browse files
authored
wait cluster alife before check tables size (#11496)
1 parent 57ae3a3 commit de53af3

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

ydb/tests/olap/load/conftest.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import allure
44
import json
55
from ydb.tests.olap.lib.ydb_cli import YdbCliHelper, WorkloadType
6+
from ydb.tests.olap.lib.ydb_cluster import YdbCluster
67
from ydb.tests.olap.lib.allure_utils import allure_test_description
78
from ydb.tests.olap.lib.results_processor import ResultsProcessor
89
from ydb.tests.olap.scenario.helpers.scenario_tests_helper import ScenarioTestHelper
@@ -51,6 +52,14 @@ def _test_name(cls, query_num: int) -> str:
5152
@classmethod
5253
@allure.step('check tables size')
5354
def check_tables_size(cls, folder: Optional[str], tables: dict[str, int]):
55+
wait_error = YdbCluster.wait_ydb_alive(
56+
300, (
57+
f'{YdbCluster.tables_path}/{folder}'
58+
if folder is not None
59+
else [f'{YdbCluster.tables_path}/{t}' for t in tables.keys()]
60+
))
61+
if wait_error is not None:
62+
pytest.fail(f'Cluster is dead: {wait_error}')
5463
sth = ScenarioTestHelper(None)
5564
errors: list[str] = []
5665
for table, expected_size in tables.items():

0 commit comments

Comments
 (0)