Skip to content

Commit 2a91c13

Browse files
committed
group: fix bug when testsets are stolen
1 parent 1cdd17e commit 2a91c13

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/ReTest.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,11 +568,13 @@ function retest(args::Union{Module,AbstractString,Regex}...;
568568
else
569569
if file === nothing
570570
if isempty(groups)
571-
idx = findfirst(todo)
571+
idx = 1
572572
else
573573
idx, file = popfirst!(groups)
574574
end
575575
end
576+
idx = findnext(todo, idx) # when a wrkr has file==nothing, it might steal an item from group of another
577+
# worker, so in any case we must search for a non-done item
576578
ts = tests[idx]
577579
todo[idx] = false
578580
if idx == length(tests) || file === nothing ||

0 commit comments

Comments
 (0)