diff --git a/docs/src/index.md b/docs/src/index.md index b7d569c..418ee3b 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -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. diff --git a/src/ParallelTestRunner.jl b/src/ParallelTestRunner.jl index db6e9fe..2fe7b45 100644 --- a/src/ParallelTestRunner.jl +++ b/src/ParallelTestRunner.jl @@ -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[] @@ -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)