Skip to content

Commit

Permalink
Propagate the current testset in the DemoServer
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesWrigley committed Sep 29, 2024
1 parent bafb243 commit 521efcd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/server.jl
Original file line number Diff line number Diff line change
Expand Up @@ -833,8 +833,13 @@ function DemoServer(f::Function, args...; timeout=10, kill_timeout=3, kwargs...)
start(demo_server)

timer = Timer(timeout)
parent_testsets = get(task_local_storage(), :__BASETESTNEXT__, [])
still_running = true
t = Threads.@spawn try
# Copy the testsets from the parent task so all @test uses in f() get
# reported properly.
task_local_storage(:__BASETESTNEXT__, parent_testsets)

f()
finally
still_running = false
Expand Down

0 comments on commit 521efcd

Please sign in to comment.