182182 @testset " allow errors" begin
183183 opts = ThunkOptions (;allow_errors= true )
184184 a = delayed (error; options= opts)(" Test" )
185- @test_throws_unwrap Dagger. DTaskFailedException collect (a)
185+ @test_throws_unwrap ( Dagger. DTaskFailedException, ErrorException) collect (a)
186186 end
187187 end
188188
396396 ([Dagger. tochunk (MyStruct (1 )), Dagger. tochunk (1 )], sizeof (MyStruct)+ sizeof (Int)),
397397 ]
398398 for arg in args
399- if arg isa Chunk
399+ if arg isa Dagger . Chunk
400400 aff = Dagger. affinity (arg)
401401 @test aff[1 ] == OSProc (1 )
402402 @test aff[2 ] == MemPool. approx_size (MemPool. poolget (arg. handle))
477477 @test res == 2
478478 @testset " self as input" begin
479479 a = delayed (dynamic_add_thunk_self_dominated)(1 )
480- @test_throws_unwrap Dagger. Sch. DynamicThunkException reason= " Cannot fetch result of dominated thunk" collect (Context (), a)
480+ @test_throws_unwrap (RemoteException, Dagger. Sch. DynamicThunkException) reason= " Cannot fetch result of dominated thunk" collect (Context (), a)
481481 end
482482 end
483483 @testset " Fetch/Wait" begin
@@ -487,11 +487,11 @@ end
487487 end
488488 @testset " self" begin
489489 a = delayed (dynamic_fetch_self)(1 )
490- @test_throws_unwrap Dagger. Sch. DynamicThunkException reason= " Cannot fetch own result" collect (Context (), a)
490+ @test_throws_unwrap (RemoteException, Dagger. Sch. DynamicThunkException) reason= " Cannot fetch own result" collect (Context (), a)
491491 end
492492 @testset " dominated" begin
493493 a = delayed (identity)(delayed (dynamic_fetch_dominated)(1 ))
494- @test_throws_unwrap Dagger. Sch. DynamicThunkException reason= " Cannot fetch result of dominated thunk" collect (Context (), a)
494+ @test_throws_unwrap (RemoteException, Dagger. Sch. DynamicThunkException) reason= " Cannot fetch result of dominated thunk" collect (Context (), a)
495495 end
496496 end
497497end
540540 t = Dagger. @spawn scope= Dagger. scope (worker= 1 , thread= 1 ) sleep (100 )
541541 start_time = time_ns ()
542542 Dagger. cancel! (t)
543- @test_throws_unwrap Dagger. DTaskFailedException fetch (t)
543+ @test_throws_unwrap ( Dagger. DTaskFailedException, InterruptException) fetch (t)
544544 t = Dagger. @spawn scope= Dagger. scope (worker= 1 , thread= 1 ) yield ()
545545 fetch (t)
546546 finish_time = time_ns ()
0 commit comments