diff options
author | Anders Svensson <[email protected]> | 2013-05-29 11:32:44 +0200 |
---|---|---|
committer | Anders Svensson <[email protected]> | 2013-05-29 11:32:44 +0200 |
commit | 59fc364f7426d1a05d916900b42ba7aa0fda32bc (patch) | |
tree | 236dcbb7ead4ddf79c5374a886896fe6c435cdf0 /lib/diameter/test/diameter_examples_SUITE.erl | |
parent | 3f6185714ee9b383d9ba330e02b73017bf68babc (diff) | |
parent | 87340609df5c1b7e8d28b4bb70356bcfbc258ab2 (diff) | |
download | otp-59fc364f7426d1a05d916900b42ba7aa0fda32bc.tar.gz otp-59fc364f7426d1a05d916900b42ba7aa0fda32bc.tar.bz2 otp-59fc364f7426d1a05d916900b42ba7aa0fda32bc.zip |
Merge branch 'anders/diameter/timetraps/OTP-10914' into maint
* anders/diameter/timetraps/OTP-10914:
Add examples testcase to help identify timetrap failures
Minor traffic suite fix
Add gen_tcp suite
Lighten up on suite timetraps
Add more information to traffic suite timeout failures
Diffstat (limited to 'lib/diameter/test/diameter_examples_SUITE.erl')
-rw-r--r-- | lib/diameter/test/diameter_examples_SUITE.erl | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/lib/diameter/test/diameter_examples_SUITE.erl b/lib/diameter/test/diameter_examples_SUITE.erl index 585fc9d3b8..1954bc319b 100644 --- a/lib/diameter/test/diameter_examples_SUITE.erl +++ b/lib/diameter/test/diameter_examples_SUITE.erl @@ -29,6 +29,7 @@ %% testcases -export([dict/1, dict/0, code/1, + slave/1, slave/0, enslave/1, start/1, traffic/1, @@ -65,11 +66,12 @@ %% =========================================================================== suite() -> - [{timetrap, {seconds, 45}}]. + [{timetrap, {minutes, 2}}]. all() -> [dict, code, + slave, enslave, start, traffic, @@ -250,6 +252,29 @@ store(Path, Dict) -> %% =========================================================================== +%% slave/1 +%% +%% Return how long slave start/stop is taking since it seems to be +%% ridiculously long on some hosts. + +slave() -> + [{timetrap, {minutes, 10}}]. + +slave(_) -> + T0 = now(), + {ok, Node} = ct_slave:start(?MODULE, ?TIMEOUTS), + T1 = now(), + T2 = rpc:call(Node, erlang, now, []), + {ok, Node} = ct_slave:stop(?MODULE), + now_diff([T0, T1, T2, now()]). + +now_diff([T1,T2|_] = Ts) -> + [timer:now_diff(T2,T1) | now_diff(tl(Ts))]; +now_diff(_) -> + []. + +%% =========================================================================== + %% enslave/1 %% %% Start two nodes: one for the server, one for the client. |