diff options
-rw-r--r-- | lib/common_test/test/ct_netconfc_SUITE_data/ns.erl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/common_test/test/ct_netconfc_SUITE_data/ns.erl b/lib/common_test/test/ct_netconfc_SUITE_data/ns.erl index e62bc617fa..2412ea6aba 100644 --- a/lib/common_test/test/ct_netconfc_SUITE_data/ns.erl +++ b/lib/common_test/test/ct_netconfc_SUITE_data/ns.erl @@ -302,10 +302,14 @@ table_trans(Fun,Args) -> S -> apply(Fun,Args); Pid -> + Ref = erlang:monitor(process,Pid), Pid ! {table_trans,Fun,Args,self()}, receive {table_trans_done,Result} -> - Result + erlang:demonitor(Ref,[flush]), + Result; + {'DOWN',Ref,process,Pid,Reason} -> + exit({main_ns_proc_died,Reason}) after 20000 -> exit(table_trans_timeout) end |