aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRory Byrne <[email protected]>2015-05-14 17:57:26 +0100
committerRory Byrne <[email protected]>2015-06-04 14:21:48 +0100
commit81e21569a6cf9e5989348939b28ccedc1cc0dab1 (patch)
tree3459db2a17b1daa0582a243739b19260abd198dd /lib
parent99ccfe4d73b3ba82a8a461b53cb30cf512ee1bb9 (diff)
downloadotp-81e21569a6cf9e5989348939b28ccedc1cc0dab1.tar.gz
otp-81e21569a6cf9e5989348939b28ccedc1cc0dab1.tar.bz2
otp-81e21569a6cf9e5989348939b28ccedc1cc0dab1.zip
Fix 6 tests in gen_tcp_misc_SUITE
All of the tests are related to gen_tcp:accept/[1,2] and each of them has the same problem: they ignore the return value of the ?EXPECT_ACCEPTS macro.
Diffstat (limited to 'lib')
-rw-r--r--lib/kernel/test/gen_tcp_misc_SUITE.erl20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/kernel/test/gen_tcp_misc_SUITE.erl b/lib/kernel/test/gen_tcp_misc_SUITE.erl
index ba4acad2e7..79e0daa005 100644
--- a/lib/kernel/test/gen_tcp_misc_SUITE.erl
+++ b/lib/kernel/test/gen_tcp_misc_SUITE.erl
@@ -1721,8 +1721,8 @@ multi_accept_close_listen(Config) when is_list(Config) ->
spawn(F),
spawn(F),
gen_tcp:close(LS),
- ?EXPECT_ACCEPTS([{_,{error,closed}},{_,{error,closed}},
- {_,{error,closed}},{_,{error,closed}}],4,500).
+ ok = ?EXPECT_ACCEPTS([{_,{error,closed}},{_,{error,closed}},
+ {_,{error,closed}},{_,{error,closed}}],4,500).
accept_timeout(suite) ->
[];
@@ -1733,7 +1733,7 @@ accept_timeout(Config) when is_list(Config) ->
Parent = self(),
F = fun() -> Parent ! {accepted,self(),gen_tcp:accept(LS,1000)} end,
P = spawn(F),
- ?EXPECT_ACCEPTS([{P,{error,timeout}}],1,2000).
+ ok = ?EXPECT_ACCEPTS([{P,{error,timeout}}],1,2000).
accept_timeouts_in_order(suite) ->
[];
@@ -1746,8 +1746,8 @@ accept_timeouts_in_order(Config) when is_list(Config) ->
P2 = spawn(mktmofun(1200,Parent,LS)),
P3 = spawn(mktmofun(1300,Parent,LS)),
P4 = spawn(mktmofun(1400,Parent,LS)),
- ?EXPECT_ACCEPTS([{P1,{error,timeout}},{P2,{error,timeout}},
- {P3,{error,timeout}},{P4,{error,timeout}}],infinity,2000).
+ ok = ?EXPECT_ACCEPTS([{P1,{error,timeout}},{P2,{error,timeout}},
+ {P3,{error,timeout}},{P4,{error,timeout}}],infinity,2000).
accept_timeouts_in_order2(suite) ->
[];
@@ -1760,8 +1760,8 @@ accept_timeouts_in_order2(Config) when is_list(Config) ->
P2 = spawn(mktmofun(1300,Parent,LS)),
P3 = spawn(mktmofun(1200,Parent,LS)),
P4 = spawn(mktmofun(1000,Parent,LS)),
- ?EXPECT_ACCEPTS([{P4,{error,timeout}},{P3,{error,timeout}},
- {P2,{error,timeout}},{P1,{error,timeout}}],infinity,2000).
+ ok = ?EXPECT_ACCEPTS([{P4,{error,timeout}},{P3,{error,timeout}},
+ {P2,{error,timeout}},{P1,{error,timeout}}],infinity,2000).
accept_timeouts_in_order3(suite) ->
[];
@@ -1774,8 +1774,8 @@ accept_timeouts_in_order3(Config) when is_list(Config) ->
P2 = spawn(mktmofun(1400,Parent,LS)),
P3 = spawn(mktmofun(1300,Parent,LS)),
P4 = spawn(mktmofun(1000,Parent,LS)),
- ?EXPECT_ACCEPTS([{P4,{error,timeout}},{P1,{error,timeout}},
- {P3,{error,timeout}},{P2,{error,timeout}}],infinity,2000).
+ ok = ?EXPECT_ACCEPTS([{P4,{error,timeout}},{P1,{error,timeout}},
+ {P3,{error,timeout}},{P2,{error,timeout}}],infinity,2000).
accept_timeouts_mixed(suite) ->
[];
@@ -1798,7 +1798,7 @@ accept_timeouts_mixed(Config) when is_list(Config) ->
ok = ?EXPECT_ACCEPTS([{P2,{ok,Port0}}] when is_port(Port0),infinity,100),
ok = ?EXPECT_ACCEPTS([{P3,{error,timeout}}],infinity,2000),
gen_tcp:connect("localhost",PortNo,[]),
- ?EXPECT_ACCEPTS([{P4,{ok,Port1}}] when is_port(Port1),infinity,100).
+ ok = ?EXPECT_ACCEPTS([{P4,{ok,Port1}}] when is_port(Port1),infinity,100).
killing_acceptor(suite) ->
[];