Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ See [Serial Tests](@ref) in the advanced usage guide for details.

Workers are recycled when they crash or exceed the memory threshold.
Additionally, [`runtests`](@ref) has two keyword arguments to further customize
failure hanlding. Setting `recycle_on_failure=true` recycles a worker after any
failure handling. Setting `recycle_on_failure=true` recycles a worker after any
failed test, so a test that corrupts process-wide state cannot poison later tests,
and `retries=N` re-runs failed tests sequentially up to `N` times to reduce false
failures caused by resource contention.
Expand Down
7 changes: 4 additions & 3 deletions src/ParallelTestRunner.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1356,7 +1356,7 @@ function _runtests(mod::Module, args::ParsedArgs;
#

tests_to_start = Threads.Atomic{Int}(length(tests))
# Stop every all-but-`n` workers in the pool.Only safe at a
# Stop all but `n` workers in the pool. Only safe at a
# phase boundary, where all `njobs` slots have been returned.
function drain_pool_leaving_n_workers!(pool, njobs, n)
alive = PTRWorker[]
Expand All @@ -1376,8 +1376,9 @@ function _runtests(mod::Module, args::ParsedArgs;
put!(pool, nothing)
end
end
# `retry_mode` forces worker recycling after every test and enables
# deletion of an old failed run of the test that just finished
# `retry_mode` forces worker recycling after every non-passing test regardless
# of the value of `recycle_on_failure` and enables deletion of an old failed
# run of the test that just finished
function run_test_phase(phase_tests, sem, shared_worker; retry_mode::Bool=false)
# for serial phases, reserve one pool slot for the shared worker
if !isnothing(shared_worker)
Expand Down