Skip to content

Commit 41c0106

Browse files
authored
tests: do not check all fields of UndefVarError for egal (#10)
Refs: JuliaLang/julia#51979
1 parent 8799660 commit 41c0106

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

test/distributed_exec.jl

+10-7
Original file line numberDiff line numberDiff line change
@@ -967,17 +967,19 @@ end
967967
# issue #16091
968968
mutable struct T16091 end
969969
wid = workers()[1]
970-
@test try
970+
try
971971
remotecall_fetch(()->T16091, wid)
972-
false
972+
@test "unreachable" === true
973973
catch ex
974-
((ex::RemoteException).captured::CapturedException).ex === UndefVarError(:T16091)
974+
ex = ((ex::RemoteException).captured::CapturedException).ex
975+
@test (ex::UndefVarError).var === :T16091
975976
end
976-
@test try
977+
try
977978
remotecall_fetch(identity, wid, T16091)
978-
false
979+
@test "unreachable" === true
979980
catch ex
980-
((ex::RemoteException).captured::CapturedException).ex === UndefVarError(:T16091)
981+
ex = ((ex::RemoteException).captured::CapturedException).ex
982+
@test (ex::UndefVarError).var === :T16091
981983
end
982984

983985
f16091a() = 1
@@ -1555,7 +1557,8 @@ try
15551557
catch ex
15561558
@test isa(ex.captured.ex.exceptions[1].ex, ErrorException)
15571559
@test occursin("BoundsError", ex.captured.ex.exceptions[1].ex.msg)
1558-
@test ex.captured.ex.exceptions[2].ex == UndefVarError(:DontExistOn1)
1560+
ex = ex.captured.ex.exceptions[2].ex
1561+
@test (ex::UndefVarError).var === :DontExistOn1
15591562
end
15601563

15611564
let

0 commit comments

Comments
 (0)