Skip to content

Commit 2acada8

Browse files
authored
fix error parsing and params in allure report (#8641)
1 parent a5cc14d commit 2acada8

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

ydb/tests/olap/lib/ydb_cli.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,9 @@ def _try_extract_error_message(stderr: str) -> str:
6161
return stderr[begin_pos:end_pos].strip()
6262

6363
try:
64-
if not YdbCluster.wait_ydb_alive(300, path):
65-
return YdbCliHelper.WorkloadRunResult(error_message='Ydb cluster is dead')
64+
wait_error = YdbCluster.wait_ydb_alive(300, path)
65+
if wait_error is not None:
66+
return YdbCliHelper.WorkloadRunResult(error_message=f'Ydb cluster is dead: {wait_error}')
6667

6768
json_path = yatest.common.work_path(f'q{query_num}.json')
6869
qout_path = yatest.common.work_path(f'q{query_num}.out')

ydb/tests/olap/load/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def _get_duraton(stats, field):
6565
allure.attach(result.stderr, 'Stderr', attachment_type=allure.attachment_type.TEXT)
6666
for p in ['Min', 'Max', 'Mean', 'Median']:
6767
if p in stats:
68-
allure.dynamic.parameter(p, stats[p])
68+
allure.dynamic.parameter(p, f'{int(stats[p])} ms')
6969
error_message = ''
7070
success = True
7171
if not result.success:

0 commit comments

Comments
 (0)