Skip to content

Commit fe900cb

Browse files
committed
Another blindfix attempt on UNKNOWN_DATABASE problem
reducing TCP keepalive timeout to 1 second reducing number of parallel stateless tests batches
1 parent 6c56b3c commit fe900cb

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

ci/jobs/functional_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def run_tests(
7070
):
7171
assert not (no_parallel and no_sequiential)
7272
test_output_file = f"{temp_dir}/test_result.txt"
73-
nproc = int(Utils.cpu_count() / 2)
73+
nproc = int(Utils.cpu_count() / 8)
7474
if batch_num and batch_total:
7575
extra_args += (
7676
f" --run-by-hash-total {batch_total} --run-by-hash-num {batch_num-1}"

ci/praktika/runner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ def _run(self, workflow, job, docker="", no_docker=False, param=None, test=""):
274274
"docker ps -a --format '{{.Names}}' | grep -q praktika && docker rm -f praktika",
275275
verbose=True,
276276
)
277-
cmd = f"docker run --rm --name praktika {'--user $(id -u):$(id -g)' if not from_root else ''} -e PYTHONPATH='.:./ci' --volume ./:{current_dir} --workdir={current_dir} {' '.join(settings)} {docker} {job.command}"
277+
cmd = f"docker run --rm --sysctl net.ipv4.tcp_keepalive_time=1 --name praktika {'--user $(id -u):$(id -g)' if not from_root else ''} -e PYTHONPATH='.:./ci' --volume ./:{current_dir} --workdir={current_dir} {' '.join(settings)} {docker} {job.command}"
278278
else:
279279
cmd = job.command
280280
python_path = os.getenv("PYTHONPATH", ":")

tests/clickhouse-test

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2010,13 +2010,14 @@ class TestCase:
20102010
)
20112011

20122012
# pylint:disable-next=consider-using-with; TODO: fix
2013-
with autokill_subprocess(Popen(command, shell=True, env=tests_env, start_new_session=True)) as proc:
2014-
try:
2015-
proc.wait(args.timeout)
2016-
except subprocess.TimeoutExpired:
2017-
# Whether the test timed out will be decided later
2018-
print(f"!!! Timeout: {args.timeout}")
2019-
pass
2013+
with Popen(command, shell=True, env=tests_env, start_new_session=True) as proc:
2014+
with autokill_subprocess(proc) as proc:
2015+
try:
2016+
proc.wait(args.timeout)
2017+
except subprocess.TimeoutExpired:
2018+
# Whether the test timed out will be decided later
2019+
print(f"!!! Timeout: {args.timeout}")
2020+
pass
20202021

20212022
total_time = (datetime.now() - start_time).total_seconds()
20222023

0 commit comments

Comments
 (0)