diff --git a/test/aeso_abi_tests.erl b/test/aeso_abi_tests.erl index 1722760..2a8faba 100644 --- a/test/aeso_abi_tests.erl +++ b/test/aeso_abi_tests.erl @@ -12,8 +12,8 @@ sandbox(Code) -> Tag = make_ref(), {Pid, Ref} = spawn_monitor(fun() -> Parent ! {Tag, Code()} end), receive - {Tag1, Res} when Tag1 =:= Tag -> erlang:demonitor(Ref, [flush]), {ok, Res}; - {'DOWN', Ref1, process, Pid1, Reason} when Ref1 =:= Ref andalso Pid1 =:= Pid -> {error, Reason} + {Tag, Res} -> erlang:demonitor(Ref, [flush]), {ok, Res}; + {'DOWN', Ref, process, Pid, Reason} -> {error, Reason} after 100 -> exit(Pid, kill), {error, loop}