aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/test/ssh_basic_SUITE.erl
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2016-10-25 11:48:33 +0200
committerHans Nilsson <[email protected]>2016-10-27 15:25:00 +0200
commitf26d0ba5d3d4c75df593b3406b9f3f3b81560e3c (patch)
treeb6bb67f66ac52209d529a739e6be9b1536d4d405 /lib/ssh/test/ssh_basic_SUITE.erl
parentf52b2eca4fd8efdde8d0c178d03ddce780bc61b1 (diff)
downloadotp-f26d0ba5d3d4c75df593b3406b9f3f3b81560e3c.tar.gz
otp-f26d0ba5d3d4c75df593b3406b9f3f3b81560e3c.tar.bz2
otp-f26d0ba5d3d4c75df593b3406b9f3f3b81560e3c.zip
ssh: better ssh_basic_SUITE:end_per_suite/2
The testcases shell_unicode_string and shell_no_unicode in ssh_basic_SUITE could raise an exception in the end_per_suite when stopping the dameon. This is due to a natural race condition between the server and the client.
Diffstat (limited to 'lib/ssh/test/ssh_basic_SUITE.erl')
-rw-r--r--lib/ssh/test/ssh_basic_SUITE.erl11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/ssh/test/ssh_basic_SUITE.erl b/lib/ssh/test/ssh_basic_SUITE.erl
index 51e0d5196b..b102ede1cb 100644
--- a/lib/ssh/test/ssh_basic_SUITE.erl
+++ b/lib/ssh/test/ssh_basic_SUITE.erl
@@ -343,14 +343,15 @@ end_per_testcase(TC, Config) when TC==shell_no_unicode ;
TC==shell_unicode_string ->
case proplists:get_value(sftpd, Config) of
{Pid, _, _} ->
- ssh:stop_daemon(Pid),
- ssh:stop();
+ catch ssh:stop_daemon(Pid);
_ ->
- ssh:stop()
- end;
+ ok
+ end,
+ end_per_testcase(Config);
end_per_testcase(_TestCase, Config) ->
end_per_testcase(Config).
-end_per_testcase(_Config) ->
+
+end_per_testcase(_Config) ->
ssh:stop(),
ok.