aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/diameter/test/diameter_examples_SUITE.erl25
1 files changed, 25 insertions, 0 deletions
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.