Skip to content

Commit 720ba76

Browse files
authored
Update error_path_intentionally_fail.jl
1 parent e9d24f7 commit 720ba76

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

test/error_path_intentionally_fail.jl

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,21 @@ mktempdir() do tmpdir
2727
@info "with old PATH" Sys.which("srun")
2828
withenv(new_env...) do
2929
@info "with new PATH" Sys.which("srun")
30+
3031
if Base.VERSION >= v"1.2-"
31-
T_expected = TaskFailedException
32+
expected_outer_ex_T = TaskFailedException
33+
expected_inner_ex_INSTANCE = ErrorException("launch_timeout exceeded")
3234
else
33-
T_expected = Base.IOError
35+
expected_outer_ex_T = Base.IOError
36+
expected_inner_ex_INSTANCE = Base.IOError("hello world")
3437
end
38+
3539
mgr = SlurmClusterManager.SlurmManager()
36-
@test_throws T_expected Distributed.addprocs(mgr)
40+
test_result = @test_throws T_expected Distributed.addprocs(mgr)
41+
cfg = ConfigForTestingTaskFailedException(;
42+
expected_outer_ex_T,
43+
expected_inner_ex_INSTANCE,
44+
)
45+
test_task_failed_exception(test_result, cfg)
3746
end
3847
end

0 commit comments

Comments
 (0)