Skip to content

Commit 964d061

Browse files
committed
Always for the printer task to finish.
1 parent 113b887 commit 964d061

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/ParallelTestRunner.jl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -608,12 +608,12 @@ function runtests(ARGS; testfilter = Returns(true), RecordType = TestRecord,
608608
# (:errored, test_name, worker_id)
609609
printer_channel = Channel{Tuple}(100)
610610

611-
push!(tasks, @async begin
611+
printer_task = @async begin
612612
last_status_update = Ref(time())
613613
try
614614
# XXX: it's possible this task doesn't run, not processing results,
615615
# while the execution runners have exited...
616-
while !done
616+
while isopen(printer_channel)
617617
got_message = false
618618
while isready(printer_channel)
619619
# Try to get a message from the channel (with timeout)
@@ -660,7 +660,7 @@ function runtests(ARGS; testfilter = Returns(true), RecordType = TestRecord,
660660
clear_status()
661661
end
662662
end
663-
end)
663+
end
664664

665665

666666
#
@@ -755,6 +755,8 @@ function runtests(ARGS; testfilter = Returns(true), RecordType = TestRecord,
755755
stop_work()
756756
end
757757
## `wait()` to actually catch any exceptions
758+
close(printer_channel)
759+
wait(printer_task)
758760
for task in tasks
759761
try
760762
wait(task)

0 commit comments

Comments
 (0)