Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
NHDaly and github-actions[bot] authored Dec 1, 2023
1 parent 2fe9140 commit 9b1c453
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
6 changes: 1 addition & 5 deletions src/persistent_tasks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,7 @@ On Julia version 1.9 and before, this test always succeeds.
a test failure).
- `expr = nothing`: An expression to run in the precompile package.
"""
function test_persistent_tasks(
package::PkgId;
broken::Bool = false,
kwargs...,
)
function test_persistent_tasks(package::PkgId; broken::Bool = false, kwargs...)
if broken
@test_broken !has_persistent_tasks(package; kwargs...)
else
Expand Down
13 changes: 9 additions & 4 deletions test/test_persistent_tasks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,16 @@ end

@testset "test_persistent_tasks(expr)" begin
if Base.VERSION >= v"1.10-"
@test !Aqua.has_persistent_tasks(getid("TransientTask"), expr = quote
fetch(Threads.@spawn nothing)
end)
@test !Aqua.has_persistent_tasks(
getid("TransientTask"),
expr = quote
fetch(Threads.@spawn nothing)
end,
)
@test Aqua.has_persistent_tasks(getid("TransientTask"), expr = quote
Threads.@spawn while true sleep(0.5) end
Threads.@spawn while true
sleep(0.5)
end
end)
end
end
Expand Down

0 comments on commit 9b1c453

Please sign in to comment.