From 41c01069533e22a6ce6b794746e4b3aa9f5a25cd Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Fri, 3 Nov 2023 14:00:22 -0400 Subject: [PATCH] tests: do not check all fields of UndefVarError for egal (#10) Refs: https://github.com/JuliaLang/julia/pull/51979 --- test/distributed_exec.jl | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/test/distributed_exec.jl b/test/distributed_exec.jl index 648cde5..166ea6d 100644 --- a/test/distributed_exec.jl +++ b/test/distributed_exec.jl @@ -967,17 +967,19 @@ end # issue #16091 mutable struct T16091 end wid = workers()[1] -@test try +try remotecall_fetch(()->T16091, wid) - false + @test "unreachable" === true catch ex - ((ex::RemoteException).captured::CapturedException).ex === UndefVarError(:T16091) + ex = ((ex::RemoteException).captured::CapturedException).ex + @test (ex::UndefVarError).var === :T16091 end -@test try +try remotecall_fetch(identity, wid, T16091) - false + @test "unreachable" === true catch ex - ((ex::RemoteException).captured::CapturedException).ex === UndefVarError(:T16091) + ex = ((ex::RemoteException).captured::CapturedException).ex + @test (ex::UndefVarError).var === :T16091 end f16091a() = 1 @@ -1555,7 +1557,8 @@ try catch ex @test isa(ex.captured.ex.exceptions[1].ex, ErrorException) @test occursin("BoundsError", ex.captured.ex.exceptions[1].ex.msg) - @test ex.captured.ex.exceptions[2].ex == UndefVarError(:DontExistOn1) + ex = ex.captured.ex.exceptions[2].ex + @test (ex::UndefVarError).var === :DontExistOn1 end let