aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/test/ssl_dist_SUITE.erl
diff options
context:
space:
mode:
authorPaul Guyot <[email protected]>2012-01-16 13:01:07 +0100
committerHenrik Nord <[email protected]>2012-02-14 10:56:52 +0100
commitfb90763e3da5b93e75908f5b0bb97f58163b910b (patch)
tree7e30a1078e1173dcf7327d7934dc0d221c53a8d4 /lib/ssl/test/ssl_dist_SUITE.erl
parent27d478f37930d147aaac62a1353e071ca17fbbcc (diff)
downloadotp-fb90763e3da5b93e75908f5b0bb97f58163b910b.tar.gz
otp-fb90763e3da5b93e75908f5b0bb97f58163b910b.tar.bz2
otp-fb90763e3da5b93e75908f5b0bb97f58163b910b.zip
Robustness and improvement to distribution over SSL
Fix a bug where the caller would timeout and ssl_tls_dist_proxy would crash. Fix a bug where a timeout from the SSL layer would block the distribution forever (typically when a non-SSL node tries to connect to an SSL node). Add this very case as a test (test_server tries to connect to SSL nodes). Run the proxy exclusively on the loopback interface.
Diffstat (limited to 'lib/ssl/test/ssl_dist_SUITE.erl')
-rw-r--r--lib/ssl/test/ssl_dist_SUITE.erl10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/ssl/test/ssl_dist_SUITE.erl b/lib/ssl/test/ssl_dist_SUITE.erl
index 8fe55ee7a4..06182970e3 100644
--- a/lib/ssl/test/ssl_dist_SUITE.erl
+++ b/lib/ssl/test/ssl_dist_SUITE.erl
@@ -26,7 +26,7 @@
-define(DEFAULT_TIMETRAP_SECS, 240).
--define(AWAIT_SLL_NODE_UP_TIMEOUT, 30000).
+-define(AWAIT_SSL_NODE_UP_TIMEOUT, 30000).
-record(node_handle,
{connection_handler,
@@ -120,6 +120,12 @@ basic(Config) when is_list(Config) ->
pang = net_adm:ping(Node1),
pang = net_adm:ping(Node2),
+ %% SSL nodes should not be able to communicate with the test_server node
+ %% either (and ping should return eventually).
+ TestServer = node(),
+ pang = apply_on_ssl_node(NH1, fun () -> net_adm:ping(TestServer) end),
+ pang = apply_on_ssl_node(NH2, fun () -> net_adm:ping(TestServer) end),
+
%%
%% Check that we are able to communicate over the erlang
%% distribution between the ssl nodes.
@@ -380,7 +386,7 @@ mk_node_cmdline(ListenPort, Name, Args) ->
%%
await_ssl_node_up(Name, LSock) ->
- case gen_tcp:accept(LSock, ?AWAIT_SLL_NODE_UP_TIMEOUT) of
+ case gen_tcp:accept(LSock, ?AWAIT_SSL_NODE_UP_TIMEOUT) of
timeout ->
gen_tcp:close(LSock),
?t:format("Timeout waiting for ssl node ~s to come up~n",