Skip to content

Commit fc1c1b1

Browse files
committed
fixup! fixup! fixup! fixup! tests: Test DTaskFailedException inner type
1 parent cdaf8df commit fc1c1b1

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

test/scopes.jl

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#@everywhere ENV["JULIA_DEBUG"] = "Dagger"
12
@testset "Chunk Scopes" begin
23
wid1, wid2 = addprocs(2, exeflags=["-t 2"])
34
@everywhere [wid1,wid2] using Dagger
@@ -56,7 +57,7 @@
5657

5758
# Different nodes
5859
for (ch1, ch2) in [(ns1_ch, ns2_ch), (ns2_ch, ns1_ch)]
59-
@test_throws_unwrap Dagger.DTaskFailedException ex.reason<"Scopes are not compatible:" fetch(Dagger.@spawn ch1 + ch2)
60+
@test_throws_unwrap (Dagger.DTaskFailedException, Dagger.Sch.SchedulingException) reason<"Scopes are not compatible:" fetch(Dagger.@spawn ch1 + ch2)
6061
end
6162
end
6263
@testset "Process Scope" begin
@@ -75,15 +76,15 @@
7576

7677
# Different process
7778
for (ch1, ch2) in [(ps1_ch, ps2_ch), (ps2_ch, ps1_ch)]
78-
@test_throws_unwrap Dagger.DTaskFailedException ex.reason<"Scopes are not compatible:" fetch(Dagger.@spawn ch1 + ch2)
79+
@test_throws_unwrap (Dagger.DTaskFailedException, Dagger.Sch.SchedulingException) reason<"Scopes are not compatible:" fetch(Dagger.@spawn ch1 + ch2)
7980
end
8081

8182
# Same process and node
8283
@test fetch(Dagger.@spawn process_scope_test(ps1_ch, ns1_ch)) == wid1
8384

8485
# Different process and node
8586
for (ch1, ch2) in [(ps1_ch, ns2_ch), (ns2_ch, ps1_ch)]
86-
@test_throws_unwrap Dagger.DTaskFailedException ex.reason<"Scopes are not compatible:" fetch(Dagger.@spawn ch1 + ch2)
87+
@test_throws_unwrap (Dagger.DTaskFailedException, Dagger.Sch.SchedulingException) reason<"Scopes are not compatible:" fetch(Dagger.@spawn ch1 + ch2)
8788
end
8889
end
8990
@testset "Exact Scope" begin
@@ -104,14 +105,14 @@
104105

105106
# Different process, different processor
106107
for (ch1, ch2) in [(es1_ch, es2_ch), (es2_ch, es1_ch)]
107-
@test_throws_unwrap Dagger.DTaskFailedException ex.reason<"Scopes are not compatible:" fetch(Dagger.@spawn ch1 + ch2)
108+
@test_throws_unwrap (Dagger.DTaskFailedException, Dagger.Sch.SchedulingException) reason<"Scopes are not compatible:" fetch(Dagger.@spawn ch1 + ch2)
108109
end
109110

110111
# Same process, different processor
111112
es1_2 = ExactScope(Dagger.ThreadProc(wid1, 2))
112113
es1_2_ch = Dagger.tochunk(nothing, OSProc(), es1_2)
113114
for (ch1, ch2) in [(es1_ch, es1_2_ch), (es1_2_ch, es1_ch)]
114-
@test_throws_unwrap Dagger.DTaskFailedException ex.reason<"Scopes are not compatible:" fetch(Dagger.@spawn ch1 + ch2)
115+
@test_throws_unwrap (Dagger.DTaskFailedException, Dagger.Sch.SchedulingException) reason<"Scopes are not compatible:" fetch(Dagger.@spawn ch1 + ch2)
115116
end
116117
end
117118
@testset "Union Scope" begin

0 commit comments

Comments
 (0)