File tree Expand file tree Collapse file tree 1 file changed +10
-12
lines changed Expand file tree Collapse file tree 1 file changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -36,20 +36,18 @@ mktempdir() do tmpdir
36
36
withenv (new_env... ) do
37
37
@info " with new PATH" Sys. which (" srun" )
38
38
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
+
46
40
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" )
50
42
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" )
53
44
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)
54
52
end
55
53
end
You can’t perform that action at this time.
0 commit comments