|
| 1 | +#@everywhere ENV["JULIA_DEBUG"] = "Dagger" |
1 | 2 | @testset "Chunk Scopes" begin
|
2 | 3 | wid1, wid2 = addprocs(2, exeflags=["-t 2"])
|
3 | 4 | @everywhere [wid1,wid2] using Dagger
|
|
56 | 57 |
|
57 | 58 | # Different nodes
|
58 | 59 | 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) |
60 | 61 | end
|
61 | 62 | end
|
62 | 63 | @testset "Process Scope" begin
|
|
75 | 76 |
|
76 | 77 | # Different process
|
77 | 78 | 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) |
79 | 80 | end
|
80 | 81 |
|
81 | 82 | # Same process and node
|
82 | 83 | @test fetch(Dagger.@spawn process_scope_test(ps1_ch, ns1_ch)) == wid1
|
83 | 84 |
|
84 | 85 | # Different process and node
|
85 | 86 | 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) |
87 | 88 | end
|
88 | 89 | end
|
89 | 90 | @testset "Exact Scope" begin
|
|
104 | 105 |
|
105 | 106 | # Different process, different processor
|
106 | 107 | 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) |
108 | 109 | end
|
109 | 110 |
|
110 | 111 | # Same process, different processor
|
111 | 112 | es1_2 = ExactScope(Dagger.ThreadProc(wid1, 2))
|
112 | 113 | es1_2_ch = Dagger.tochunk(nothing, OSProc(), es1_2)
|
113 | 114 | 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) |
115 | 116 | end
|
116 | 117 | end
|
117 | 118 | @testset "Union Scope" begin
|
|
0 commit comments