From 96d04d58fd91062a6e5f96fbc6cce49ee325d087 Mon Sep 17 00:00:00 2001 From: Anders Svensson Date: Tue, 9 Apr 2013 15:57:19 +0200 Subject: Lighten up on suite timetraps Due to sporadic timeouts one some (slow) hosts. --- lib/diameter/test/diameter_examples_SUITE.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/diameter/test/diameter_examples_SUITE.erl') diff --git a/lib/diameter/test/diameter_examples_SUITE.erl b/lib/diameter/test/diameter_examples_SUITE.erl index 585fc9d3b8..98b280f1a4 100644 --- a/lib/diameter/test/diameter_examples_SUITE.erl +++ b/lib/diameter/test/diameter_examples_SUITE.erl @@ -65,7 +65,7 @@ %% =========================================================================== suite() -> - [{timetrap, {seconds, 45}}]. + [{timetrap, {minutes, 2}}]. all() -> [dict, -- cgit v1.2.3 From 87340609df5c1b7e8d28b4bb70356bcfbc258ab2 Mon Sep 17 00:00:00 2001 From: Anders Svensson Date: Tue, 23 Apr 2013 11:30:06 +0200 Subject: Add examples testcase to help identify timetrap failures There are still enslave/1 failures on some hosts despite a 2 minute timetrap. --- lib/diameter/test/diameter_examples_SUITE.erl | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'lib/diameter/test/diameter_examples_SUITE.erl') diff --git a/lib/diameter/test/diameter_examples_SUITE.erl b/lib/diameter/test/diameter_examples_SUITE.erl index 98b280f1a4..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, @@ -70,6 +71,7 @@ suite() -> 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. -- cgit v1.2.3