aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/test
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2015-10-16 10:34:56 +0200
committerHans Nilsson <[email protected]>2015-10-19 12:48:53 +0200
commit16d2e402ca0a4f37f12175f866e1c6c2842303bb (patch)
tree4a461f6ee4743a6b3bc0c98678e3a4abda532c78 /lib/ssh/test
parentfdae664715f6b64e3f0c61729344bc372b67e1e2 (diff)
downloadotp-16d2e402ca0a4f37f12175f866e1c6c2842303bb.tar.gz
otp-16d2e402ca0a4f37f12175f866e1c6c2842303bb.tar.bz2
otp-16d2e402ca0a4f37f12175f866e1c6c2842303bb.zip
ssh: wait for subsystem exit in ssh_connection_SUITE:max_channels_option
Diffstat (limited to 'lib/ssh/test')
-rw-r--r--lib/ssh/test/ssh_connection_SUITE.erl10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/ssh/test/ssh_connection_SUITE.erl b/lib/ssh/test/ssh_connection_SUITE.erl
index f0fdf5c0cc..1b93cc9c32 100644
--- a/lib/ssh/test/ssh_connection_SUITE.erl
+++ b/lib/ssh/test/ssh_connection_SUITE.erl
@@ -700,6 +700,16 @@ max_channels_option(Config) when is_list(Config) ->
%%%---- close the shell
ok = ssh_connection:send(ConnectionRef, ChannelId0, "exit().\n", 5000),
+ %%%---- wait for the subsystem to terminate
+ receive
+ {ssh_cm,ConnectionRef,{closed,ChannelId0}} -> ok
+ after 5000 ->
+ ct:log("Timeout waiting for '{ssh_cm,~p,{closed,~p}}'~n"
+ "Message queue:~n~p",
+ [ConnectionRef,ChannelId0,erlang:process_info(self(),messages)]),
+ ct:fail("exit Timeout",[])
+ end,
+
%%%---- exec #3
success = ssh_connection:exec(ConnectionRef, ChannelId5, "testing3.\n", infinity),
receive