aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2019-08-20 09:40:08 +0200
committerIngela Anderton Andin <[email protected]>2019-08-21 10:08:03 +0200
commit196327a132934fabe283946a576a345f76eec685 (patch)
treeff6b9a9516e920e517fe8b99451090a326edf4a5
parentec82235231c66d3de392507d684bd4c5263de07e (diff)
downloadotp-196327a132934fabe283946a576a345f76eec685.tar.gz
otp-196327a132934fabe283946a576a345f76eec685.tar.bz2
otp-196327a132934fabe283946a576a345f76eec685.zip
ssl: Robustify test case
-rw-r--r--lib/ssl/test/openssl_session_SUITE.erl1
-rw-r--r--lib/ssl/test/ssl_test_lib.erl5
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/ssl/test/openssl_session_SUITE.erl b/lib/ssl/test/openssl_session_SUITE.erl
index 97d83b98c3..7c129633da 100644
--- a/lib/ssl/test/openssl_session_SUITE.erl
+++ b/lib/ssl/test/openssl_session_SUITE.erl
@@ -149,6 +149,7 @@ reuse_session_erlang_server() ->
[{doc, "Test erlang server with openssl client that reconnects with the"
"same session id, to test reusing of sessions."}].
reuse_session_erlang_server(Config) when is_list(Config) ->
+ process_flag(trap_exit, true),
ServerOpts = ssl_test_lib:ssl_options(server_rsa_opts, Config),
{_, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
diff --git a/lib/ssl/test/ssl_test_lib.erl b/lib/ssl/test/ssl_test_lib.erl
index 5dd5fc45af..c4f294771a 100644
--- a/lib/ssl/test/ssl_test_lib.erl
+++ b/lib/ssl/test/ssl_test_lib.erl
@@ -493,7 +493,10 @@ check_result(Server, ServerMsg, Client, ClientMsg) ->
ct:log("~p:~p~n Openssl ~s~n",[?MODULE,?LINE, Debug]),
check_result(Server, ServerMsg, Client, ClientMsg);
{Port,closed} when is_port(Port) ->
- ct:log("~p:~p~n Openssl port ~n",[?MODULE,?LINE]),
+ ct:log("~p:~p~n Openssl port closed ~n",[?MODULE,?LINE]),
+ check_result(Server, ServerMsg, Client, ClientMsg);
+ {'EXIT', epipe} ->
+ ct:log("~p:~p~n Openssl port died ~n",[?MODULE,?LINE]),
check_result(Server, ServerMsg, Client, ClientMsg);
Unexpected ->
Reason = {{expected, {Client, ClientMsg}},