mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 09:32:01 +00:00
Merge pull request #38490 from ClickHouse/test-handle-full-queue
Handle full queue exception in tests
This commit is contained in:
commit
2386554746
@ -5,6 +5,7 @@
|
||||
# pylint: disable=too-many-lines
|
||||
|
||||
import enum
|
||||
from queue import Full
|
||||
import shutil
|
||||
import sys
|
||||
import os
|
||||
@ -1581,15 +1582,18 @@ def do_run_tests(jobs, test_suite: TestSuite, parallel):
|
||||
for _ in range(jobs):
|
||||
parallel_tests_array.append((None, batch_size, test_suite))
|
||||
|
||||
with closing(multiprocessing.Pool(processes=jobs)) as pool:
|
||||
pool.map_async(run_tests_array, parallel_tests_array)
|
||||
try:
|
||||
with closing(multiprocessing.Pool(processes=jobs)) as pool:
|
||||
pool.map_async(run_tests_array, parallel_tests_array)
|
||||
|
||||
for suit in test_suite.parallel_tests:
|
||||
queue.put(suit, timeout=args.timeout * 1.1)
|
||||
for suit in test_suite.parallel_tests:
|
||||
queue.put(suit, timeout=args.timeout * 1.1)
|
||||
|
||||
for _ in range(jobs):
|
||||
queue.put(None, timeout=args.timeout * 1.1)
|
||||
for _ in range(jobs):
|
||||
queue.put(None, timeout=args.timeout * 1.1)
|
||||
|
||||
queue.close()
|
||||
except Full:
|
||||
queue.close()
|
||||
|
||||
pool.join()
|
||||
|
Loading…
Reference in New Issue
Block a user