From 0523081e39e9825f5efa69a0dab5deefbb075cce Mon Sep 17 00:00:00 2001 From: juhlig Date: Mon, 3 Jun 2019 14:11:03 +0200 Subject: Fix ssl sendfile tests for Windows --- test/ranch_ct_hook.erl | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'test/ranch_ct_hook.erl') 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), -- cgit v1.2.3