aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorjuhlig <[email protected]>2019-06-03 14:11:03 +0200
committerjuhlig <[email protected]>2019-06-03 14:11:03 +0200
commit0523081e39e9825f5efa69a0dab5deefbb075cce (patch)
treed735d010d61c21fbaf2d8bf8534c35ef1f05e8cd /test
parenta34c38fbdac7730e3cea9634c0580d5f87e4ac47 (diff)
downloadranch-0523081e39e9825f5efa69a0dab5deefbb075cce.tar.gz
ranch-0523081e39e9825f5efa69a0dab5deefbb075cce.tar.bz2
ranch-0523081e39e9825f5efa69a0dab5deefbb075cce.zip
Fix ssl sendfile tests for Windows
Diffstat (limited to 'test')
-rw-r--r--test/ranch_ct_hook.erl11
-rw-r--r--test/sendfile_SUITE.erl4
2 files changed, 13 insertions, 2 deletions
diff --git a/test/ranch_ct_hook.erl b/test/ranch_ct_hook.erl
index 07f89df..54bef27 100644
--- a/test/ranch_ct_hook.erl
+++ b/test/ranch_ct_hook.erl
@@ -22,6 +22,17 @@ init(_, _) ->
%% ranch_sup children.
application:set_env(ranch, ranch_sup_intensity, 10),
application:set_env(ranch, ranch_sup_period, 1),
+ ok = application:load(ssl),
+ case {os:type(), application:get_key(ssl, vsn)} of
+ %% Internal active,N is broken on Windows since
+ %% OTP 21.2/ssl 9.1.
+ %% @todo Put an upper limit on the version when
+ %% this is fixed in a future OTP version.
+ {{win32, nt}, {ok, Vsn}} when Vsn >= "9.1" ->
+ application:set_env(ssl, internal_active_n, 1);
+ _ ->
+ ok
+ end,
ct_helper:start([ranch]),
ct_helper:make_certs_in_ets(),
error_logger:add_report_handler(ct_helper_error_h),
diff --git a/test/sendfile_SUITE.erl b/test/sendfile_SUITE.erl
index 97716f7..92d4d7d 100644
--- a/test/sendfile_SUITE.erl
+++ b/test/sendfile_SUITE.erl
@@ -279,8 +279,8 @@ sockets(Config) ->
Self ! {ok, Client}
end,
_ = spawn_link(Fun),
- {ok, Server} = Transport:accept(LSocket, 500),
- {ok, _} = Transport:handshake(Server, [], 500),
+ {ok, Server} = Transport:accept(LSocket, 5000),
+ {ok, _} = Transport:handshake(Server, [], 5000),
receive
{ok, Client} ->
ok = Transport:close(LSocket),