Skip to content

Commit ed1360f

Browse files
authored
Update error_path_manager_timeout.jl
1 parent 5c56209 commit ed1360f

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

test/error_path_manager_timeout.jl

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,20 +36,18 @@ mktempdir() do tmpdir
3636
withenv(new_env...) do
3737
@info "with new PATH" Sys.which("srun")
3838
expected_outer_ex_T = TaskFailedException
39-
expected_inner_ex_T = ErrorException
40-
expected_inner_ex_INSTANCE = ErrorException("launch_timeout exceeded")
41-
mgr = SlurmClusterManager.SlurmManager(; launch_timeout = 2.0)
42-
test_result = @test_throws expected_outer_ex_T Distributed.addprocs(mgr)
43-
observed_outer_ex = test_result.value
44-
# @show dump(observed_outer_ex)
45-
@test observed_outer_ex isa expected_outer_ex_T
39+
4640
if Base.VERSION >= v"1.1"
47-
observed_inner_ex = recursively_unwrap_task_failed_ex(observed_outer_ex)
48-
@test observed_inner_ex isa expected_inner_ex_T
49-
@test observed_inner_ex == expected_inner_ex_INSTANCE
41+
expected_inner_ex_INSTANCE = ErrorException("launch_timeout exceeded")
5042
else
51-
@warn "Skipping some tests on Julia 1.0.x" Base.VERSION
52-
@test_skip false
43+
expected_inner_ex_INSTANCE = ErrorException("launch_timeout exceeded")
5344
end
45+
mgr = SlurmClusterManager.SlurmManager(; launch_timeout = 2.0)
46+
test_result = @test_throws expected_outer_ex_T Distributed.addprocs(mgr)
47+
cfg = ConfigForTestingTaskFailedException(;
48+
expected_outer_ex_T,
49+
expected_inner_ex_INSTANCE,
50+
)
51+
test_task_failed_exception(test_result, cfg)
5452
end
5553
end

0 commit comments

Comments
 (0)