aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/test/gen_tcp_api_SUITE.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2016-02-25 15:28:25 +0100
committerBjörn Gustavsson <[email protected]>2016-03-09 14:02:50 +0100
commitca290148fbde80f1cda249c1c15562c5bc9aedaa (patch)
tree904a73d7f61f001c5a3448a14d80a684c10ae61c /lib/kernel/test/gen_tcp_api_SUITE.erl
parent362707ca44fcfb269f9d981dee13233f1aa7cf2d (diff)
downloadotp-ca290148fbde80f1cda249c1c15562c5bc9aedaa.tar.gz
otp-ca290148fbde80f1cda249c1c15562c5bc9aedaa.tar.bz2
otp-ca290148fbde80f1cda249c1c15562c5bc9aedaa.zip
Eliminate use of test_server:fail/0,1
Diffstat (limited to 'lib/kernel/test/gen_tcp_api_SUITE.erl')
-rw-r--r--lib/kernel/test/gen_tcp_api_SUITE.erl18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/kernel/test/gen_tcp_api_SUITE.erl b/lib/kernel/test/gen_tcp_api_SUITE.erl
index f74fffcaf9..77124c7e58 100644
--- a/lib/kernel/test/gen_tcp_api_SUITE.erl
+++ b/lib/kernel/test/gen_tcp_api_SUITE.erl
@@ -188,7 +188,7 @@ t_shutdown_async(Config) when is_list(Config) ->
?line case erlang:port_info(S, queue_size) of
{queue_size, N} when N > 0 -> ok;
{queue_size, 0} when OS =:= win32 -> ok;
- {queue_size, 0} = T -> ?t:fail({unexpected, T})
+ {queue_size, 0} = T -> ct:fail({unexpected, T})
end,
?line ok = gen_tcp:shutdown(S, write),
@@ -196,7 +196,7 @@ t_shutdown_async(Config) when is_list(Config) ->
?line {error, closed} = gen_tcp:recv(Client, 0),
?line case length(Buf) of
PayloadSize -> ok;
- Sz -> ?t:fail({payload_size,
+ Sz -> ct:fail({payload_size,
{expected, PayloadSize},
{received, Sz}})
end.
@@ -324,13 +324,13 @@ implicit_inet6(S, Addr) ->
timeout({M,F,A}, Lower, Upper) ->
case test_server:timecall(M, F, A) of
{Time, Result} when Time < Lower ->
- test_server:fail({too_short_time, Time, Result});
+ ct:fail({too_short_time, Time, Result});
{Time, Result} when Time > Upper ->
- test_server:fail({too_long_time, Time, Result});
+ ct:fail({too_long_time, Time, Result});
{_, {error, timeout}} ->
ok;
{_, Result} ->
- test_server:fail({unexpected_result, Result})
+ ct:fail({unexpected_result, Result})
end.
connect_timeout({M,F,A}, Lower, Upper) ->
@@ -345,17 +345,17 @@ connect_timeout({M,F,A}, Lower, Upper) ->
Pinfo = erlang:port_info(Socket),
Db = inet_db:lookup_socket(Socket),
Peer = inet:peername(Socket),
- test_server:fail({too_short_time, Time,
+ ct:fail({too_short_time, Time,
[Result,Pinfo,Db,Peer]});
_ ->
- test_server:fail({too_short_time, Time, Result})
+ ct:fail({too_short_time, Time, Result})
end;
{Time, Result} when Time > Upper ->
- test_server:fail({too_long_time, Time, Result});
+ ct:fail({too_long_time, Time, Result});
{_, {error, timeout}} ->
ok;
{_, Result} ->
- test_server:fail({unexpected_result, Result})
+ ct:fail({unexpected_result, Result})
end.
%% Try to obtain an unused IP address in the local network.