Merge pull request #38490 from ClickHouse/test-handle-full-queue

Handle full queue exception in tests
This commit is contained in:
Alexander Tokmakov 2022-06-28 15:03:10 +03:00 committed by GitHub
commit 2386554746
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,6 +5,7 @@
# pylint: disable=too-many-lines
import enum
from queue import Full
import shutil
import sys
import os
@ -1581,6 +1582,7 @@ def do_run_tests(jobs, test_suite: TestSuite, parallel):
for _ in range(jobs):
parallel_tests_array.append((None, batch_size, test_suite))
try:
with closing(multiprocessing.Pool(processes=jobs)) as pool:
pool.map_async(run_tests_array, parallel_tests_array)
@ -1591,6 +1593,8 @@ def do_run_tests(jobs, test_suite: TestSuite, parallel):
queue.put(None, timeout=args.timeout * 1.1)
queue.close()
except Full:
queue.close()
pool.join()