aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/test/ssh_test_lib.hrl
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2018-02-22 15:21:15 +0100
committerHans Nilsson <[email protected]>2018-02-27 16:22:25 +0100
commit4f88d07a757d4deef6c8a40db11f962e74d3a8c5 (patch)
tree82424e2c7b597003f5f41d26e653b63c556eb552 /lib/ssh/test/ssh_test_lib.hrl
parent4125586046b8b0cd1e8a11879f960d212ce53c82 (diff)
downloadotp-4f88d07a757d4deef6c8a40db11f962e74d3a8c5.tar.gz
otp-4f88d07a757d4deef6c8a40db11f962e74d3a8c5.tar.bz2
otp-4f88d07a757d4deef6c8a40db11f962e74d3a8c5.zip
ssh: Fix acceptor sup testcase
Diffstat (limited to 'lib/ssh/test/ssh_test_lib.hrl')
-rw-r--r--lib/ssh/test/ssh_test_lib.hrl7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/ssh/test/ssh_test_lib.hrl b/lib/ssh/test/ssh_test_lib.hrl
index eaf856e6e8..4b6579bd71 100644
--- a/lib/ssh/test/ssh_test_lib.hrl
+++ b/lib/ssh/test/ssh_test_lib.hrl
@@ -16,12 +16,12 @@
%%-------------------------------------------------------------------------
%% Help macro
%%-------------------------------------------------------------------------
--define(wait_match(Pattern, FunctionCall, Bind, Timeout, Ntries),
+-define(wait_match(Pattern, Guard, FunctionCall, Bind, Timeout, Ntries),
Bind =
(fun() ->
F = fun(N, F1) ->
case FunctionCall of
- Pattern -> Bind;
+ Pattern when Guard -> Bind;
_ when N>0 ->
ct:pal("Must sleep ~p ms at ~p:~p",[Timeout,?MODULE,?LINE]),
timer:sleep(Timeout),
@@ -34,6 +34,9 @@
end)()
).
+-define(wait_match(Pattern, FunctionCall, Bind, Timeout, Ntries),
+ ?wait_match(Pattern, true, FunctionCall, Bind, Timeout, Ntries)).
+
-define(wait_match(Pattern, FunctionCall, Timeout, Ntries), ?wait_match(Pattern, FunctionCall, ok, Timeout, Ntries)).
-define(wait_match(Pattern, FunctionCall, Bind), ?wait_match(Pattern, FunctionCall, Bind, 500, 10) ).