aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2016-06-15 15:57:34 +0200
committerSiri Hansen <[email protected]>2016-07-08 10:13:07 +0200
commit9c8111085ef28b0a5174acca60021ecdca830299 (patch)
treee0c3be671c329b08b692c993a3d0692006a5bbbd /lib/common_test
parenta4d32149bc15a9f250e87c195ed385001dd0a2c6 (diff)
downloadotp-9c8111085ef28b0a5174acca60021ecdca830299.tar.gz
otp-9c8111085ef28b0a5174acca60021ecdca830299.tar.bz2
otp-9c8111085ef28b0a5174acca60021ecdca830299.zip
[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.
Diffstat (limited to 'lib/common_test')
-rw-r--r--lib/common_test/test/ct_netconfc_SUITE_data/ns.erl6
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