From d7ecd81bc632d69debd7e2001c0efde5a8e22f30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Drvo=C5=A1t=C4=9Bp?= Date: Fri, 7 Jun 2024 18:50:26 +0200 Subject: [PATCH] . --- test/runtests.jl | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index 9b91b31..6dd8ea3 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -20,8 +20,7 @@ const url = "http://127.0.0.1:$port" done = Threads.Atomic{Bool}(false) # Schedule some work that's known to be expensive, to profile it workload() = @async begin - for _ in 1:1000 - if done[] return end + while !done[] InteractiveUtils.peakflops(1024) yield() # yield to allow the tests to run end @@ -85,6 +84,7 @@ const url = "http://127.0.0.1:$port" fname = read(IOBuffer(req.body), String) @info "filename: $fname" @test isfile(fname) + done[] = true end @testset "debug endpoint cpu profile start/end" begin @@ -156,8 +156,7 @@ const url = "http://127.0.0.1:$port" done = Threads.Atomic{Bool}(false) # Schedule some work that's known to be expensive, to profile it workload() = @async begin - for _ in 1:200 - if done[] return end + while !done[] global a = [[] for i in 1:1000] yield() # yield to allow the tests to run end