diff options
author | Björn Gustavsson <[email protected]> | 2016-02-28 15:39:13 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2016-03-09 13:20:01 +0100 |
commit | 11603b076ff9fe8ee1b0687db5dc8411fae318d4 (patch) | |
tree | 88b68de3ef76f0f6e578f76dd3eec2df8cfa558b /lib/stdlib/test/gen_server_SUITE.erl | |
parent | d5054f75f5a62bcb6c9b63e01d34d28f0867e21d (diff) | |
download | otp-11603b076ff9fe8ee1b0687db5dc8411fae318d4.tar.gz otp-11603b076ff9fe8ee1b0687db5dc8411fae318d4.tar.bz2 otp-11603b076ff9fe8ee1b0687db5dc8411fae318d4.zip |
gen_server_SUITE: Eliminate use of test_server:timecall/3
Diffstat (limited to 'lib/stdlib/test/gen_server_SUITE.erl')
-rw-r--r-- | lib/stdlib/test/gen_server_SUITE.erl | 17 |
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 |