Skip to content

Commit 7b03f4b

Browse files
committed
Update timeout values
Increases the timeouts. Also, the resource timeout is now independent on when the test is run. Previously, because we multiplied `process_time()`, tests that were executed later had a much larger timeout. See also discussion at: 7c01623#r162003602
1 parent 3cd39fa commit 7b03f4b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mutmut/__main__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -904,7 +904,7 @@ def inner_timout_checker():
904904
start_times_by_pid = dict(m.start_time_by_pid)
905905
for pid, start_time in start_times_by_pid.items():
906906
run_time = now - start_time
907-
if run_time.total_seconds() > (m.estimated_time_of_tests_by_mutant[mutant_name] + 1) * 4:
907+
if run_time.total_seconds() > (m.estimated_time_of_tests_by_mutant[mutant_name] + 1) * 15:
908908
try:
909909
os.kill(pid, signal.SIGXCPU)
910910
except ProcessLookupError:
@@ -1038,7 +1038,7 @@ def read_one_child_exit_status():
10381038
os._exit(33)
10391039

10401040
estimated_time_of_tests = m.estimated_time_of_tests_by_mutant[mutant_name]
1041-
cpu_time_limit = ceil((estimated_time_of_tests + 1) * 2 + process_time()) * 10
1041+
cpu_time_limit = ceil((estimated_time_of_tests + 1) * 30 + process_time())
10421042
# signal SIGXCPU after <cpu_time_limit>. One second later signal SIGKILL if it is still running
10431043
resource.setrlimit(resource.RLIMIT_CPU, (cpu_time_limit, cpu_time_limit + 1))
10441044

0 commit comments

Comments
 (0)