Skip to content

Commit 13c2c5f

Browse files
committed
Merge branch 'main' into mg/serial-test
2 parents 7b2ea8f + 062c7f1 commit 13c2c5f

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

test/runtests.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,7 +1028,15 @@ end
10281028
# We'll use jobs + 1 workers because one will crash.
10291029
@test ParallelTestRunner.ID_COUNTER[] == old_id_counter + jobs + 1
10301030
end
1031+
end
10311032

1033+
# This testset should always be the last one, don't add anything after this.
1034+
# We want to make sure there are no running workers at the end of the tests.
1035+
@testset "no workers running" begin
1036+
children = _count_child_pids()
1037+
if children >= 0
1038+
@test children == 0
1039+
end
10321040
end
10331041

10341042
end

test/utils.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ function _count_child_pids(pid = getpid())
1414
# because it's spawned by the current process, in that case we subtract
1515
# one to always exclude it, otherwise if we're getting the number of
1616
# children of another process we start from 0.
17-
count = pid == getpid() : -1 : 0
17+
count = pid == getpid() ? -1 : 0
1818
for line in lines
1919
m = match(r" *(\d+) +(\d+)", line)
2020
if !isnothing(m)

0 commit comments

Comments
 (0)