Skip to content

Commit 3d9bf69

Browse files
committed
tests: Fix logging tests for multithreading
1 parent e5c2a17 commit 3d9bf69

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

test/logging.jl

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,12 +130,14 @@ import Colors, GraphViz, DataFrames, Plots
130130
@test any(e->haskey(e, :fire), esat)
131131
@test any(e->haskey(e, :take), esat)
132132
@test any(e->haskey(e, :finish), esat)
133-
# Note: May one day be true as scheduler evolves
134-
@test !any(e->haskey(e, :compute), esat)
135-
@test !any(e->haskey(e, :move), esat)
136-
psat = l1[:psat]
137-
# Note: May become false
138-
@test all(e->length(e) == 0, psat)
133+
if Threads.nthreads() == 1
134+
# Note: May one day be true as scheduler evolves
135+
@test !any(e->haskey(e, :compute), esat)
136+
@test !any(e->haskey(e, :move), esat)
137+
psat = l1[:psat]
138+
# Note: May become false
139+
@test all(e->length(e) == 0, psat)
140+
end
139141

140142
had_psat_proc = 0
141143
for wo in filter(w->w != 1, keys(logs))

0 commit comments

Comments
 (0)