From 9c8111085ef28b0a5174acca60021ecdca830299 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Wed, 15 Jun 2016 15:57:34 +0200 Subject: [ct test] Monitor netconf server during transaction Netconf client tests fail every now and then with 'table_trans_timeout' with no obvious reason. A monitor of the maint netconf server process is now added - in case this process crashes during the transaction. --- lib/common_test/test/ct_netconfc_SUITE_data/ns.erl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/common_test/test') 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 -- cgit v1.2.3