Skip to content

Commit

Permalink
fix error parsing (#6649)
Browse files Browse the repository at this point in the history
  • Loading branch information
iddqdex authored Jul 13, 2024
1 parent 1a6514b commit 0602b3c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ydb/tests/olap/lib/ydb_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,16 @@ def __init__(
def workload_run(type: WorkloadType, path: str, query_num: int, iterations: int = 5,
timeout: float = 100.) -> YdbCliHelper.WorkloadRunResult:
def _try_extract_error_message(stderr: str) -> str:
begin_str = f'{query_num}:\n'
end_str = 'Query text:\n'
begin_str = f'{query_num}:'
end_str = 'Query text:'
begin_pos = stderr.find(begin_str)
if begin_pos < 0:
return ''
begin_pos += len(begin_str)
end_pos = stderr.find(end_str, begin_pos)
if end_pos < 0:
return stderr[begin_pos:]
return stderr[begin_pos:end_pos]
return stderr[begin_pos:].strip()
return stderr[begin_pos:end_pos].strip()

try:
if not YdbCluster.wait_ydb_alive(60):
Expand Down

0 comments on commit 0602b3c

Please sign in to comment.