aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2016-02-28 15:39:13 +0100
committerBjörn Gustavsson <[email protected]>2016-03-09 13:20:01 +0100
commit11603b076ff9fe8ee1b0687db5dc8411fae318d4 (patch)
tree88b68de3ef76f0f6e578f76dd3eec2df8cfa558b /lib
parentd5054f75f5a62bcb6c9b63e01d34d28f0867e21d (diff)
downloadotp-11603b076ff9fe8ee1b0687db5dc8411fae318d4.tar.gz
otp-11603b076ff9fe8ee1b0687db5dc8411fae318d4.tar.bz2
otp-11603b076ff9fe8ee1b0687db5dc8411fae318d4.zip
gen_server_SUITE: Eliminate use of test_server:timecall/3
Diffstat (limited to 'lib')
-rw-r--r--lib/stdlib/test/gen_server_SUITE.erl17
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/stdlib/test/gen_server_SUITE.erl b/lib/stdlib/test/gen_server_SUITE.erl
index f108933eb0..5f509cad62 100644
--- a/lib/stdlib/test/gen_server_SUITE.erl
+++ b/lib/stdlib/test/gen_server_SUITE.erl
@@ -587,14 +587,15 @@ cast_fast(Config) when is_list(Config) ->
% ?line io:format("Nodes ~p~n", [rpc:call(N, ?MODULE, cast_fast_messup, [])]),
ct:sleep(1000),
?line [Node] = nodes(),
- ?line {Time,ok} = test_server:timecall(gen_server, cast,
- [{hopp,FalseNode},hopp]),
- ?line true = test_server:stop_node(Node),
- ?line if Time > 1.0 -> % Default listen timeout is about 7.0 s
- ct:fail(hanging_cast);
- true ->
- ok
- end.
+ {Time,ok} = timer:tc(fun() ->
+ gen_server:cast({hopp,FalseNode}, hopp)
+ end),
+ true = test_server:stop_node(Node),
+ if Time > 1000000 -> % Default listen timeout is about 7.0 s
+ ct:fail(hanging_cast);
+ true ->
+ ok
+ end.
cast_fast_messup() ->
%% Register a false node: hopp@hostname