Skip to content

Commit b91b1e2

Browse files
committed
Stop workers when there are no more tests to run
1 parent 33980bb commit b91b1e2

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/ParallelTestRunner.jl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1059,7 +1059,14 @@ function runtests(mod::Module, args::ParsedArgs;
10591059
Malt.stop(wrkr)
10601060
end
10611061

1062-
delete!(running_tests, test)
1062+
Base.@lock test_lock begin
1063+
# Stop worker if there are no more tests remaining to run.
1064+
if isempty(tests) && !isnothing(wrkr) && Malt.isrunning(wrkr)
1065+
Malt.stop(wrkr)
1066+
end
1067+
1068+
delete!(running_tests, test)
1069+
end
10631070
end
10641071
end)
10651072
end

0 commit comments

Comments
 (0)