Skip to content

Commit 287d9b5

Browse files
authored
Update error_path_manager_timeout.jl
1 parent ec2efea commit 287d9b5

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

test/error_path_manager_timeout.jl

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
function unwrap_task_failed_ex(outer_ex::TaskFailedException)
1+
function recursively_unwrap_task_failed_ex(ex::ErrorException)
2+
return ex
3+
end
4+
5+
function recursively_unwrap_task_failed_ex(outer_ex::TaskFailedException)
6+
return recursively_unwrap_task_failed_ex(outer_ex.task.exception)
27
end
38

49
mktempdir() do tmpdir
@@ -42,13 +47,10 @@ mktempdir() do tmpdir
4247
mgr = SlurmClusterManager.SlurmManager(; launch_timeout = 2.0)
4348
test_result = @test_throws expected_outer_ex_T Distributed.addprocs(mgr)
4449
observed_outer_ex = test_result.value
45-
@info "" observed_outer_ex # TODO: Delete this line
46-
@show dump(observed_outer_ex) # TODO: Delete this line
50+
# @show dump(observed_outer_ex)
4751
@test observed_outer_ex isa expected_outer_ex_T
4852
if Base.VERSION >= v"1.1"
49-
observed_inner_ex = unwrap_task_failed_ex(observed_outer_ex)
50-
@info "" observed_inner_ex # TODO: Delete this line
51-
@show dump(observed_inner_ex) # TODO: Delete this line
53+
observed_inner_ex = recursively_unwrap_task_failed_ex(observed_outer_ex)
5254
@test observed_inner_ex isa expected_inner_ex_T
5355
@test observed_inner_ex == expected_inner_ex_INSTANCE
5456
else

0 commit comments

Comments
 (0)