diff options
author | Hans Nilsson <[email protected]> | 2018-04-25 14:43:22 +0200 |
---|---|---|
committer | Hans Nilsson <[email protected]> | 2018-04-25 14:43:22 +0200 |
commit | af8340ee003ec8c7d4d185e4df4252c6df39cbbc (patch) | |
tree | e2e9672a59f9f3608443300a39dd58e4f39fcbbe | |
parent | 960467ead200635cb935dfd3aa5a5abe38299ca6 (diff) | |
download | otp-af8340ee003ec8c7d4d185e4df4252c6df39cbbc.tar.gz otp-af8340ee003ec8c7d4d185e4df4252c6df39cbbc.tar.bz2 otp-af8340ee003ec8c7d4d185e4df4252c6df39cbbc.zip |
ssh: Better logging in test case
-rw-r--r-- | lib/ssh/test/ssh_options_SUITE.erl | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/ssh/test/ssh_options_SUITE.erl b/lib/ssh/test/ssh_options_SUITE.erl index 12a85c40aa..86a8ac5aa8 100644 --- a/lib/ssh/test/ssh_options_SUITE.erl +++ b/lib/ssh/test/ssh_options_SUITE.erl @@ -1227,7 +1227,7 @@ max_sessions(Config, ParallelLogin, Connect0) when is_function(Connect0,2) -> [_|_] = Connections, %% Now try one more than alowed: - ct:log("Info Report might come here...",[]), + ct:pal("Info Report expected here (if not disabled) ...",[]), try Connect(Host,Port) of _ConnectionRef1 -> @@ -1235,8 +1235,7 @@ max_sessions(Config, ParallelLogin, Connect0) when is_function(Connect0,2) -> {fail,"Too many connections accepted"} catch error:{badmatch,{error,"Connection closed"}} -> - %% Step 2 ok: could not set up max_sessions+1 connections - %% This is expected + ct:log("Step 2 ok: could not set up too many connections. Good.",[]), %% Now stop one connection and try to open one more ok = ssh:close(hd(Connections)), try_to_connect(Connect, Host, Port, Pid) @@ -1249,16 +1248,15 @@ max_sessions(Config, ParallelLogin, Connect0) when is_function(Connect0,2) -> try_to_connect(Connect, Host, Port, Pid) -> - {ok,Tref} = timer:send_after(3000, timeout_no_connection), % give the supervisors some time... + {ok,Tref} = timer:send_after(30000, timeout_no_connection), % give the supervisors some time... try_to_connect(Connect, Host, Port, Pid, Tref, 1). % will take max 3300 ms after 11 tries try_to_connect(Connect, Host, Port, Pid, Tref, N) -> try Connect(Host,Port) of _ConnectionRef1 -> - %% Step 3 ok: could set up one more connection after killing one - %% Thats good. timer:cancel(Tref), + ct:log("Step 3 ok: could set up one more connection after killing one. Thats good.",[]), ssh:stop_daemon(Pid), receive % flush. timeout_no_connection -> ok |