aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2011-09-16 10:10:16 +0200
committerIngela Anderton Andin <[email protected]>2011-10-03 15:07:30 +0200
commiteb8de5aa37948e45ebc4d18244b626ea68f5e5b7 (patch)
tree222476099aab3a4ce1cddb092e9fca3ca6d5fb03 /lib/ssl
parent1e710284447fbc5cbe59ba3627db461b3bcfe940 (diff)
downloadotp-eb8de5aa37948e45ebc4d18244b626ea68f5e5b7.tar.gz
otp-eb8de5aa37948e45ebc4d18244b626ea68f5e5b7.tar.bz2
otp-eb8de5aa37948e45ebc4d18244b626ea68f5e5b7.zip
Add payload test
Diffstat (limited to 'lib/ssl')
-rw-r--r--lib/ssl/test/ssl_dist_SUITE.erl51
1 files changed, 50 insertions, 1 deletions
diff --git a/lib/ssl/test/ssl_dist_SUITE.erl b/lib/ssl/test/ssl_dist_SUITE.erl
index 7325e97ff5..f54eb29062 100644
--- a/lib/ssl/test/ssl_dist_SUITE.erl
+++ b/lib/ssl/test/ssl_dist_SUITE.erl
@@ -39,7 +39,7 @@ suite() ->
[{ct_hooks,[ts_install_cth]}].
all() ->
- [basic].
+ [basic, payload].
groups() ->
[].
@@ -132,6 +132,55 @@ basic(Config) when is_list(Config) ->
stop_ssl_node(NH2),
success(Config).
+
+payload(doc) ->
+ ["Test that send a lot of data between the ssl distributed noes"];
+payload(suite) ->
+ [];
+payload(Config) when is_list(Config) ->
+ NH1 = start_ssl_node(Config),
+ Node1 = NH1#node_handle.nodename,
+ NH2 = start_ssl_node(Config),
+ Node2 = NH2#node_handle.nodename,
+
+ pong = apply_on_ssl_node(NH1, fun () -> net_adm:ping(Node2) end),
+
+ [Node2] = apply_on_ssl_node(NH1, fun () -> nodes() end),
+ [Node1] = apply_on_ssl_node(NH2, fun () -> nodes() end),
+
+ %%
+ %% Check that we are able to communicate over the erlang
+ %% distribution between the ssl nodes.
+ %%
+ Ref = make_ref(),
+ spawn(fun () ->
+ apply_on_ssl_node(
+ NH1,
+ fun () ->
+ send_to_tstcntrl({Ref, self()}),
+ receive
+ {From, Msg} ->
+ From ! {self(), Msg}
+ end
+ end)
+ end),
+ receive
+ {Ref, SslPid} ->
+ ok = apply_on_ssl_node(
+ NH2,
+ fun () ->
+ Msg = crypto:rand_bytes(100000),
+ SslPid ! {self(), Msg},
+ receive
+ {SslPid, Msg} ->
+ ok
+ end
+ end)
+ end,
+ stop_ssl_node(NH1),
+ stop_ssl_node(NH2),
+ success(Config).
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% %%
%% Internal functions %%