clickhouse-test: replace NUL byte to avoid breaking CSV parser

On CI [1]:

    022-12-12 12:49:55 01910_client_replxx_container_overflow_long:                            [ FAIL ] 2.25 sec. - return code: 1
    2022-12-12 12:49:55 send: spawn id exp4 not open
    2022-12-12 12:49:55     while executing
    ...
    Traceback (most recent call last):
      File "/home/ubuntu/actions-runner/_work/_temp/stateless_debug/ClickHouse/tests/ci/functional_test_check.py", line 327, in <module>
        state, description, test_results, additional_logs = process_results(
      File "/home/ubuntu/actions-runner/_work/_temp/stateless_debug/ClickHouse/tests/ci/functional_test_check.py", line 173, in process_results
        test_results = list(csv.reader(results_file, delimiter="\t"))  # type: ignore
    _csv.Error: line contains NUL
    INFO:root:Update Mergeable Check by Stateless tests (asan)
    Error: Process completed with exit code 1.

      [1]: https://github.com/ClickHouse/ClickHouse/actions/runs/3669487007/jobs/6221215715

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
This commit is contained in:
Azat Khuzhin 2022-12-14 15:01:01 +01:00
parent d5f7adb4cd
commit e7df64df77

View File

@ -1141,6 +1141,9 @@ class TestCase:
proc, stdout, stderr, debug_log, total_time
)
result.check_if_need_retry(args, stdout, stderr, self.runs_count)
# to avoid breaking CSV parser
result.description = result.description.replace('\0', '')
if result.status == TestStatus.FAIL:
result.description = self.add_info_about_settings(
args, result.description