aboutsummaryrefslogtreecommitdiffstats
path: root/lib/snmp/test
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2019-07-02 16:16:22 +0200
committerMicael Karlberg <[email protected]>2019-07-02 16:16:22 +0200
commit1df2cdb7d3e234bebd7ed6fb88081b324b69952d (patch)
tree1d19f7e9ca2e76583dd588d1c3ef4572d54c10ad /lib/snmp/test
parent56f91a0f4b2307cd4ffe8d921b038dcb7ec85359 (diff)
downloadotp-1df2cdb7d3e234bebd7ed6fb88081b324b69952d.tar.gz
otp-1df2cdb7d3e234bebd7ed6fb88081b324b69952d.tar.bz2
otp-1df2cdb7d3e234bebd7ed6fb88081b324b69952d.zip
[snmp|agent|test] Add another "skip point"
We have hosts (mostly *very* slooow VMs) that can timeout anything. Since we are basically testing communication, we therefor must check for system events at every failure. Grrr!
Diffstat (limited to 'lib/snmp/test')
-rw-r--r--lib/snmp/test/snmp_agent_test_lib.erl20
1 files changed, 17 insertions, 3 deletions
diff --git a/lib/snmp/test/snmp_agent_test_lib.erl b/lib/snmp/test/snmp_agent_test_lib.erl
index 07600bbaf7..615d6774b9 100644
--- a/lib/snmp/test/snmp_agent_test_lib.erl
+++ b/lib/snmp/test/snmp_agent_test_lib.erl
@@ -481,10 +481,24 @@ tc_run(Mod, Func, Args, Opts) ->
(catch snmp_test_mgr:stop()),
?SKIP(Reason);
{'EXIT', Reason} ->
- ?EPRINT2("apply exit catched: "
- "~n ~p", [Reason]),
+ %% We have hosts (mostly *very* slooow VMs) that
+ %% can timeout anything. Since we are basically
+ %% testing communication, we therefor must check
+ %% for system events at every failure. Grrr!
+ SysEvs = snmp_test_global_sys_monitor:events(),
(catch snmp_test_mgr:stop()),
- ?FAIL({apply_failed, {Mod, Func, Args}, Reason});
+ if
+ (SysEvs =:= []) ->
+ ?EPRINT2("TC runner failed: "
+ "~n ~p~n", [Reason]),
+ ?FAIL({apply_failed, {Mod, Func, Args}, Reason});
+ true ->
+ ?EPRINT2("apply exit catched when we got system events: "
+ "~n Reason: ~p"
+ "~n Sys Events: ~p"
+ "~n", [Reason, SysEvs]),
+ ?SKIP([{reason, Reason}, {system_events, SysEvs}])
+ end;
Res ->
(catch snmp_test_mgr:stop()),
Res