mirror of
https://github.com/valitydev/woody_erlang.git
synced 2024-11-06 02:15:19 +00:00
CDS-64: add options for SSL support (#103)
* Get rid of acceptors_pool_size environment variable * Fix end_per_testcase/2 in the main test suite
This commit is contained in:
parent
3fd2111537
commit
a4921bde49
@ -24,6 +24,7 @@
|
||||
ignore => [
|
||||
elvis,
|
||||
elvis_utils,
|
||||
woody_ssl_SUITE,
|
||||
woody_tests_SUITE,
|
||||
woody_transport_opts_SUITE
|
||||
]
|
||||
|
@ -15,7 +15,6 @@
|
||||
cache
|
||||
]},
|
||||
{env, [
|
||||
{acceptors_pool_size, 100},
|
||||
{enable_debug, false}
|
||||
]},
|
||||
{modules, []},
|
||||
|
@ -107,7 +107,7 @@ send(Url, Body, Options, ResOpts, WoodyState) ->
|
||||
false ->
|
||||
_ = log_event(?EV_CLIENT_SEND, WoodyState, #{url => Url}),
|
||||
% MSPF-416: We resolve url host to an ip here to prevent
|
||||
% reusing keep-alive connections do dead hosts
|
||||
% reusing keep-alive connections to dead hosts
|
||||
case woody_resolver:resolve_url(Url, WoodyState, ResOpts) of
|
||||
{ok, {OldUrl, NewUrl}} ->
|
||||
Headers = add_host_header(OldUrl, make_woody_headers(Context)),
|
||||
|
@ -28,7 +28,17 @@
|
||||
}.
|
||||
-export_type([handler_limits/0]).
|
||||
|
||||
-type transport_opts() :: ranch:opts().
|
||||
-type transport_opts() :: #{
|
||||
connection_type => worker | supervisor,
|
||||
handshake_timeout => timeout(),
|
||||
max_connections => ranch:max_conns(),
|
||||
logger => module(),
|
||||
num_acceptors => pos_integer(),
|
||||
shutdown => timeout() | brutal_kill,
|
||||
socket => any(),
|
||||
socket_opts => any(),
|
||||
transport => module() % ranch_tcp | ranch_ssl
|
||||
}.
|
||||
|
||||
-export_type([transport_opts/0]).
|
||||
|
||||
@ -104,16 +114,8 @@
|
||||
%%
|
||||
-spec child_spec(atom(), options()) ->
|
||||
supervisor:child_spec().
|
||||
child_spec(Id, Opts = #{
|
||||
ip := Ip,
|
||||
port := Port
|
||||
}) ->
|
||||
% TODO
|
||||
% It's essentially a _transport option_ as it is in the newer ranch versions, therefore we should
|
||||
% probably make it such here too. Ultimately we need to stop looking woody environment vars up.
|
||||
SocketOpts = [{ip, Ip}, {port, Port}],
|
||||
TransportOpts0 = maps:get(transport_opts, Opts, #{}),
|
||||
{Transport, TransportOpts} = get_socket_transport(SocketOpts, TransportOpts0),
|
||||
child_spec(Id, Opts) ->
|
||||
{Transport, TransportOpts} = get_socket_transport(Opts),
|
||||
CowboyOpts = get_cowboy_config(Opts),
|
||||
RanchRef = {?MODULE, Id},
|
||||
DrainSpec = make_drain_childspec(RanchRef, Opts),
|
||||
@ -133,15 +135,12 @@ make_server_childspec(Id, Children) ->
|
||||
type => supervisor
|
||||
}.
|
||||
|
||||
get_socket_transport(SocketOpts, TransportOpts0) ->
|
||||
TransportOpts = case maps:get(num_acceptors, TransportOpts0, undefined) of
|
||||
undefined ->
|
||||
AcceptorsPool = genlib_app:env(woody, acceptors_pool_size, ?DEFAULT_ACCEPTORS_POOLSIZE),
|
||||
set_ranch_option(num_acceptors, AcceptorsPool, TransportOpts0);
|
||||
_ ->
|
||||
TransportOpts0
|
||||
end,
|
||||
{ranch_tcp, set_ranch_option(socket_opts, SocketOpts, TransportOpts)}.
|
||||
get_socket_transport(Opts = #{ip := Ip, port := Port}) ->
|
||||
Defaults = #{num_acceptors => ?DEFAULT_ACCEPTORS_POOLSIZE},
|
||||
TransportOpts = maps:merge(Defaults, maps:get(transport_opts, Opts, #{})),
|
||||
Transport = maps:get(transport, TransportOpts, ranch_tcp),
|
||||
SocketOpts = [{ip, Ip}, {port, Port} | maps:get(socket_opts, TransportOpts, [])],
|
||||
{Transport, set_ranch_option(socket_opts, SocketOpts, TransportOpts)}.
|
||||
|
||||
set_ranch_option(Key, Value, Opts) ->
|
||||
Opts#{Key => Value}.
|
||||
|
203
test/woody_ssl_SUITE.erl
Normal file
203
test/woody_ssl_SUITE.erl
Normal file
@ -0,0 +1,203 @@
|
||||
-module(woody_ssl_SUITE).
|
||||
|
||||
-include_lib("public_key/include/public_key.hrl").
|
||||
-include_lib("common_test/include/ct.hrl").
|
||||
-include_lib("stdlib/include/assert.hrl").
|
||||
-include("woody_test_thrift.hrl").
|
||||
|
||||
-behaviour(supervisor).
|
||||
-behaviour(woody_server_thrift_handler).
|
||||
-behaviour(woody_event_handler).
|
||||
|
||||
%% common test callbacks
|
||||
-export([
|
||||
all/0,
|
||||
init_per_suite/1,
|
||||
end_per_suite/1
|
||||
]).
|
||||
|
||||
%% tests
|
||||
-export([
|
||||
client_wo_cert_test/1,
|
||||
valid_client_cert_test/1,
|
||||
invalid_client_cert_test/1
|
||||
]).
|
||||
|
||||
%% woody_event_handler callback
|
||||
-export([handle_event/4]).
|
||||
|
||||
%% woody_server_thrift_handler callback
|
||||
-export([handle_function/4]).
|
||||
|
||||
%% supervisor callback
|
||||
-export([init/1]).
|
||||
|
||||
-type config() :: [{atom(), any()}].
|
||||
-type case_name() :: atom().
|
||||
|
||||
-define(PATH, "/v1/test/weapons").
|
||||
-define(THRIFT_DEFS, woody_test_thrift).
|
||||
|
||||
-define(data_dir(C), ?config(data_dir, C)).
|
||||
-define(valid_subdir(C), filename:join(?data_dir(C), "valid")).
|
||||
-define(invalid_subdir(C), filename:join(?data_dir(C), "invalid")).
|
||||
|
||||
-define(ca_cert(C), filename:join(?valid_subdir(C), "ca.crt")).
|
||||
-define(server_cert(C), filename:join(?valid_subdir(C), "server.pem")).
|
||||
-define(client_cert(C), filename:join(?valid_subdir(C), "client.pem")).
|
||||
|
||||
-define(invalid_client_cert(C), filename:join(?invalid_subdir(C), "client.pem")).
|
||||
|
||||
%%%
|
||||
%%% CT callbacks
|
||||
%%%
|
||||
|
||||
-spec all() ->
|
||||
[case_name()].
|
||||
|
||||
all() ->
|
||||
[
|
||||
client_wo_cert_test,
|
||||
invalid_client_cert_test,
|
||||
valid_client_cert_test
|
||||
].
|
||||
|
||||
-spec init_per_suite(config()) ->
|
||||
config().
|
||||
|
||||
init_per_suite(C) ->
|
||||
{ok, Sup} = supervisor:start_link({local, ?MODULE}, ?MODULE, []),
|
||||
true = erlang:unlink(Sup),
|
||||
{ok, Apps} = application:ensure_all_started(woody),
|
||||
NewConfig = [{sup, Sup}, {apps, Apps} | C],
|
||||
{ok, _WoodyServer} = start_woody_server(NewConfig),
|
||||
NewConfig.
|
||||
|
||||
-spec end_per_suite(config()) ->
|
||||
ok.
|
||||
|
||||
end_per_suite(C) ->
|
||||
Sup = ?config(sup, C),
|
||||
ok = proc_lib:stop(Sup),
|
||||
[application:stop(App) || App <- proplists:get_value(apps, C)],
|
||||
ok.
|
||||
|
||||
%%%
|
||||
%%% Tests
|
||||
%%%
|
||||
|
||||
-spec client_wo_cert_test(config()) -> _.
|
||||
|
||||
client_wo_cert_test(C) ->
|
||||
SSLOptions = [{cacertfile, ?ca_cert(C)}],
|
||||
?assertException(
|
||||
error,
|
||||
{woody_error, {internal, result_unexpected, <<"{tls_alert,\"handshake failure\"}">>}},
|
||||
get_weapon(?FUNCTION_NAME, <<"BFG">>, SSLOptions)
|
||||
).
|
||||
|
||||
-spec valid_client_cert_test(config()) -> _.
|
||||
|
||||
valid_client_cert_test(C) ->
|
||||
SSLOptions = [{cacertfile, ?ca_cert(C)}, {certfile, ?client_cert(C)}],
|
||||
{ok, #'Weapon'{}} = get_weapon(?FUNCTION_NAME, <<"BFG">>, SSLOptions).
|
||||
|
||||
-spec invalid_client_cert_test(config()) -> _.
|
||||
|
||||
invalid_client_cert_test(C) ->
|
||||
SSLOptions = [{cacertfile, ?ca_cert(C)}, {certfile, ?invalid_client_cert(C)}],
|
||||
?assertException(
|
||||
error,
|
||||
{woody_error, {internal, result_unexpected, <<"{tls_alert,\"unknown ca\"}">>}},
|
||||
get_weapon(?FUNCTION_NAME, <<"BFG">>, SSLOptions)
|
||||
).
|
||||
|
||||
%%%
|
||||
%%% woody_event_handler callback
|
||||
%%%
|
||||
|
||||
-spec handle_event(
|
||||
woody_event_handler:event(),
|
||||
woody:rpc_id(),
|
||||
woody_event_handler:event_meta(),
|
||||
woody:options()
|
||||
) -> _.
|
||||
|
||||
handle_event(Event, RpcId, Meta, _) ->
|
||||
{_Severity, {Format, Msg}, EvMeta} = woody_event_handler:format_event_and_meta(
|
||||
Event, Meta, RpcId,
|
||||
[event, role, service, service_schema, function, type, args, metadata,
|
||||
deadline, status, url, code, result, execution_time]
|
||||
),
|
||||
ct:pal(Format ++ "~nmeta: ~p", Msg ++ [EvMeta]).
|
||||
|
||||
%%%
|
||||
%%% woody_server_thrift_handler callback
|
||||
%%%
|
||||
|
||||
-spec handle_function(woody:func(), woody:args(), woody_context:ctx(), woody:options()) ->
|
||||
{ok, woody:result()}.
|
||||
|
||||
handle_function(get_weapon, [Name, _Data], _Context, _Opts) ->
|
||||
{ok, #'Weapon'{name = Name, slot_pos = 0}}.
|
||||
|
||||
%%%
|
||||
%%% Supervisor callback
|
||||
%%%
|
||||
|
||||
-spec init(_) -> _.
|
||||
|
||||
init(_) ->
|
||||
{ok, {
|
||||
{one_for_one, 1, 1}, []
|
||||
}}.
|
||||
|
||||
%%%
|
||||
%%% Internal functions
|
||||
%%%
|
||||
|
||||
start_woody_server(C) ->
|
||||
Sup = ?config(sup, C),
|
||||
Server = woody_server:child_spec(?MODULE, #{
|
||||
handlers => [{?PATH, {{?THRIFT_DEFS, 'Weapons'}, ?MODULE}}],
|
||||
event_handler => ?MODULE,
|
||||
ip => {0, 0, 0, 0},
|
||||
port => 8043,
|
||||
transport_opts => #{
|
||||
transport => ranch_ssl,
|
||||
socket_opts => [
|
||||
{cacertfile, ?ca_cert(C)},
|
||||
{certfile, ?server_cert(C)},
|
||||
{verify, verify_peer},
|
||||
{fail_if_no_peer_cert, true}
|
||||
]
|
||||
}
|
||||
}),
|
||||
supervisor:start_child(Sup, Server).
|
||||
|
||||
get_weapon(Id, Gun, SSLOptions) ->
|
||||
Context = woody_context:new(to_binary(Id)),
|
||||
{Url, Service} = get_service_endpoint('Weapons'),
|
||||
Options = #{
|
||||
url => Url,
|
||||
event_handler => ?MODULE,
|
||||
transport_opts => #{
|
||||
ssl_options => [
|
||||
{server_name_indication, "Test Server"},
|
||||
{verify, verify_peer} |
|
||||
SSLOptions
|
||||
]
|
||||
}
|
||||
},
|
||||
woody_client:call({Service, get_weapon, [Gun, <<>>]}, Options, Context).
|
||||
|
||||
get_service_endpoint('Weapons') ->
|
||||
{
|
||||
"https://localhost:8043" ?PATH,
|
||||
{?THRIFT_DEFS, 'Weapons'}
|
||||
}.
|
||||
|
||||
to_binary(Atom) when is_atom(Atom) ->
|
||||
erlang:atom_to_binary(Atom, utf8);
|
||||
to_binary(Binary) when is_binary(Binary) ->
|
||||
Binary.
|
82
test/woody_ssl_SUITE_data/invalid/client.pem
Normal file
82
test/woody_ssl_SUITE_data/invalid/client.pem
Normal file
@ -0,0 +1,82 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIFYjCCA0oCCQDz6dHZOku5ejANBgkqhkiG9w0BAQsFADByMQswCQYDVQQGEwJS
|
||||
VTEPMA0GA1UECAwGTW9zY293MQ8wDQYDVQQHDAZNb3Njb3cxEjAQBgNVBAoMCVJC
|
||||
Sy5Nb25leTEWMBQGA1UECwwNRGV2RGVwYXJ0bWVudDEVMBMGA1UEAwwMVGVzdCBS
|
||||
b290IENBMCAXDTE5MDUzMDE2MzM0M1oYDzIyMTkwNDEyMTYzMzQzWjByMQswCQYD
|
||||
VQQGEwJSVTEPMA0GA1UECAwGTW9zY293MQ8wDQYDVQQHDAZNb3Njb3cxEjAQBgNV
|
||||
BAoMCVJCSy5Nb25leTEWMBQGA1UECwwNRGV2RGVwYXJ0bWVudDEVMBMGA1UEAwwM
|
||||
V3JvbmcgQ2xpZW50MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA0qx8
|
||||
1rLrFgSgzrpv0A65s1genJGptLkgapWWndvjCAtWpx0mW30sYsxQiKjqGD2LqV3e
|
||||
DWoSwSxajcl5QbS1C4SV92C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IHBRY59q
|
||||
MlaQ28r2IYGqOU2egC/V1TxMDouTsWJ5CxWKOoI3zcpe6U6xmpQ2lSZL+vZtHwiT
|
||||
mys6FgIf9aiHo6mjU8AQZNOGtvjU2W6mW0phHfD55rWwrPH/dOpYPaidhZQnz9FE
|
||||
9dAC/7+0UOs2iTnRd/e5dHhyA/PAu5kI1y/CNUV2B1a10vxZKynSYtUucTdorgwa
|
||||
nWAe6zhyAEMIK4M/s5dR2lEVDDOHlY35AoIBAQCrEqdd3ad7h97VejyO16K6o5mE
|
||||
82Vj2nltD8zV8WyngAZ9Iwy79rGCgSUaqFeLcsoRYGdJA0OLVSiMiEp/JjX/eKHt
|
||||
381+iZjLh+PU1KW/K+6QIc/Eb9BBl+WY4ySqOtbkUlP40p9qY5HTDRc0WmOeZcMn
|
||||
kh34LWpg9mPaodKT3cxYxJSY1girm2p/0K66Vnf5zZAgHyi72WYh8+4rjqIUcACC
|
||||
ryqCJZ7FdLD6fucgLf8FVpj2vs5n+XoUVVxgVp3P7opU5Tikf1KI11iyKSFzxodF
|
||||
TjsEZYzfYCpgNjdLVN1DxWMoHcQWTp98w3EjV/NdibcCQLEcXm9HSqHrdbgq
|
||||
-----END RSA PRIVATE KEY-----
|
33
test/woody_ssl_SUITE_data/valid/ca.crt
Normal file
33
test/woody_ssl_SUITE_data/valid/ca.crt
Normal file
@ -0,0 +1,33 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIFvDCCA6SgAwIBAgIJAPquYKKbPZEmMA0GCSqGSIb3DQEBCwUAMHIxCzAJBgNV
|
||||
BAYTAlJVMQ8wDQYDVQQIDAZNb3Njb3cxDzANBgNVBAcMBk1vc2NvdzESMBAGA1UE
|
||||
CgwJUkJLLk1vbmV5MRYwFAYDVQQLDA1EZXZEZXBhcnRtZW50MRUwEwYDVQQDDAxU
|
||||
ZXN0IFJvb3QgQ0EwIBcNMTkwNTMwMTY0NjU5WhgPMjIxOTA0MTIxNjQ2NTlaMHIx
|
||||
CzAJ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1Ti3fcHHgwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAgEA
|
||||
ho/bLXG1y/zLlIxdxjE2KtNlPTRdtq9tVaJBjXO3RgRpCGOQNrFDThIk41sFRPdx
|
||||
22ttDrR3ezkuze9abVT8A0kTylSepvov4sb8pIsmdtSQc5uchVwmnVQJcRUTnPlT
|
||||
/WMJA72tGHLopHw9Ar/SAUxEJxMuv+dSzuZFPOnitFc4Opp7v00TDp0fhovQ1gbp
|
||||
UJzL2PhICvyFGmeMg9ZkVphMEW0SCzpd0+C7uyq2gTHJpAAK/sr6CaFLSbuwWGUz
|
||||
Jwn+3fFBObHT944f499zEt8O9Co4E/Bp4w2AlwlzSyYzGWP3IuAH+DaA3xHqtbcO
|
||||
1JoWmgCFsJVvqgPm0junoPMnYKgEhEVqRFTvodeSXUH+Nw7BJ/IqUsxyslfVJXic
|
||||
csoj+D0C6P7udvCIPqxNmZWYxAuSDs0tLLTqGyFV6SJMFGlxqPmGnyGqQryUzIbM
|
||||
CljeTgQZLPM04WC1Nc+upPlOE/vzLkmVZ/Y1zOcvRUOC4Da+aC2N5yynrOj8bXqT
|
||||
94l7o5TIK4c6xKU2bg6uj2imNZ7pQqt3xNDPmYEpMyPHcqqWYMfZfzUWthN64weI
|
||||
nMMYqHJWvTp0iB4Btbqp+vD/RLY93rJiYQ/5NJUZ85VstadV07iJQ4gYEwH+wwtN
|
||||
B/LGE1bCdcBSWqmDLf/yonUEC4aas9Dnsw6uk/XNG4U=
|
||||
-----END CERTIFICATE-----
|
82
test/woody_ssl_SUITE_data/valid/client.pem
Normal file
82
test/woody_ssl_SUITE_data/valid/client.pem
Normal file
@ -0,0 +1,82 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIFZzCCA08CCQDuBstLoij7wTANBgkqhkiG9w0BAQsFADByMQswCQYDVQQGEwJS
|
||||
VTEPMA0GA1UECAwGTW9zY293MQ8wDQYDVQQHDAZNb3Njb3cxEjAQBgNVBA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6Gxmn
|
||||
-----END RSA PRIVATE KEY-----
|
82
test/woody_ssl_SUITE_data/valid/server.pem
Normal file
82
test/woody_ssl_SUITE_data/valid/server.pem
Normal file
@ -0,0 +1,82 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIFYTCCA0kCCQDuBstLoij7wDANBgkqhkiG9w0BAQsFADByMQswCQYDVQQGEwJS
|
||||
VTEPMA0GA1UECAwGTW9zY293MQ8wDQYDVQQHDAZNb3Njb3cxEjAQBgNVBAoMCVJC
|
||||
Sy5Nb25leTEWMBQGA1UECwwNRGV2RGVwYXJ0bWVudDEVMBMGA1UEAwwMVGVzdCBS
|
||||
b290IENBMCAXDTE5MDUzMDE2NDgwOFoYDzIyMTkwNDEyMTY0ODA4WjBxMQswCQYD
|
||||
VQQGEwJSVTEPMA0GA1UECAwGTW9zY293MQ8wDQYDVQQHDAZNb3Njb3cxEjAQBgNV
|
||||
BAoMCVJCSy5Nb25leTEWMBQGA1UECwwNRGV2RGVwYXJ0bWVudDEUMBIGA1UEAwwL
|
||||
VGVzdCBTZXJ2ZXIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCjOd4B
|
||||
mFEgWoEKx3B2+59XsSXZ4HXKUqOvbTeu6TsvyYJxgLKeCapfA25XTlGtNtdouO70
|
||||
paL4q5vvB4sTeTU9Ya4WYEmnN1fS0ZrkPsN8Hefehink9kD+m9nU0X7TvSgiTFy3
|
||||
wQPCqJ6lGYg0SB7Fxuhx+6wP+J+nCTG5wf/78ZAl4TPa4Ckt63C/kD1xNG48Fu4J
|
||||
y+djn6GNDl4IuodGUibBu6u1oddWzSgjZgzK1mWJ9naYe276d243eeL8d1UwTX1j
|
||||
VT3gZBQCMattydyPUg63kH3D4xBJHG2A2a9TMfDbvmjcMvpshPPeRGjQ3mOQRG12
|
||||
awWaJ+DtQoPx/D09emWt6zezx89ysXRlj8BGTfyfbzaiWu3fb1DuX2VlQyIH7oPK
|
||||
MVwPKm/e3u5sPU3/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KWEVDEYg==
|
||||
-----END CERTIFICATE-----
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIIJKAIBAAKCAgEAozneAZhRIFqBCsdwdvufV7El2eB1ylKjr203ruk7L8mCcYCy
|
||||
ngmqXwNuV05RrTbXaLju9KWi+Kub7weLE3k1PWGuFmBJpzdX0tGa5D7DfB3n3oYp
|
||||
5PZA/pvZ1NF+070oIkxct8EDwqiepRmINEgexcbocfusD/ifpwkxucH/+/GQJeEz
|
||||
2uApLetwv5A9cTRuPBbuCcvnY5+hjQ5eCLqHRlImwburtaHXVs0oI2YMytZlifZ2
|
||||
mHtu+nduN3ni/HdVME19Y1U94GQUAjGrbcncj1IOt5B9w+MQSRxtgNmvUzHw275o
|
||||
3DL6bITz3kRo0N5jkERtdmsFmifg7UKD8fw9PXplres3s8fPcrF0ZY/ARk38n282
|
||||
olrt329Q7l9lZUMiB+6DyjFcDypv3t7ubD1N/6He65v6jyqmcHISOQ6zzG9FA7fc
|
||||
0WwRB9W83wTgY8nu+oSsFQWl/KM8sVNDGXgImtRn3k/Vhs04k0YwvrA0mWtYFIZU
|
||||
vxevFH0lQnLaVFB1QGDvj1ZaDN4TnAYbCJhQfmIL21LS0FBCv9KDOmtkmD4a0Y6R
|
||||
IJ6b6FVq8NeYlqCSAhn+Rw0tmpfmr9BTyaeIxHgzUMjAOttkwluc5SR0xYJESB9d
|
||||
7Hu1FGtvX1H86i0dxkDmavSNMfLN+QPyCiTcu2fevOVQgrWqagV3If9rRLMCAwEA
|
||||
AQKCAgAp/Iao7l9f7Sfod+jsEkmoqv7Ljrt98cf9JiD+syvwXOta+vn3QRE8I4vM
|
||||
lW7ZGZRLcda1w62qPap8z/nsZm9VfLzlMJuBkfDbX+Nx9tseICs2yFgad2W8mKZt
|
||||
4f23xZ5/RBlNgy7OccVtPqYUnMCdq067kzttWEzpEKpj2A1a54Zm2AkYsjSlhTyZ
|
||||
aicD6bK5bkSI7JR2wecye5GguSp24kbp6rZ+oETeJSPAB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0GhMh6oa0ImwYB6BungOkxZ5iqfDCaROHQnhk+qc2
|
||||
64TY1q2dTbuXC1lM4oz9+0IfO5gSF2C4XHa71H0SCqDmIgh3G1hUay9q+ja6E07J
|
||||
jEUH0DT671YHu/ZWTb9Fo1f3MWalY5JT8fzaOkpq6OsJJP8X0tnuQGQxdxC2Mfpf
|
||||
FCzAWb3eGATF3GQimhxrjdiwDXn14p4XIds+hx6+gsxtK1HHIXb8dobUnk8=
|
||||
-----END RSA PRIVATE KEY-----
|
@ -31,7 +31,7 @@
|
||||
init_per_group/2,
|
||||
end_per_group/2,
|
||||
init_per_testcase/2,
|
||||
end_per_test_case/2
|
||||
end_per_testcase/2
|
||||
]).
|
||||
-export([
|
||||
context_add_put_get_meta_ok_test/1,
|
||||
@ -184,7 +184,7 @@
|
||||
-spec init_per_group(group_name(), config()) -> config().
|
||||
-spec end_per_group(group_name(), config()) -> any().
|
||||
-spec init_per_testcase(case_name(), config()) -> config().
|
||||
-spec end_per_test_case(case_name(), config()) -> any().
|
||||
-spec end_per_testcase(case_name(), config()) -> any().
|
||||
|
||||
-spec context_add_put_get_meta_ok_test(config()) -> any().
|
||||
-spec context_get_meta_by_key_ok_test(config()) -> any().
|
||||
@ -490,21 +490,12 @@ get_fail_code(call_no_headers_502_test) -> 502;
|
||||
get_fail_code(call_no_headers_503_test) -> 503;
|
||||
get_fail_code(call_no_headers_504_test) -> 504.
|
||||
|
||||
end_per_test_case(_, C) ->
|
||||
end_per_testcase(_, C) ->
|
||||
case proplists:get_value(sup, C, undefined) of
|
||||
undefined ->
|
||||
ok;
|
||||
Sup ->
|
||||
exit(Sup, shutdown),
|
||||
Ref = monitor(process, Sup),
|
||||
receive
|
||||
{'DOWN', Ref, process, Sup, _Reason} ->
|
||||
demonitor(Ref),
|
||||
ok
|
||||
after 1000 ->
|
||||
demonitor(Ref, [flush]),
|
||||
error(exit_timeout)
|
||||
end
|
||||
ok = proc_lib:stop(Sup)
|
||||
end.
|
||||
|
||||
%%
|
||||
|
@ -53,7 +53,7 @@ all() ->
|
||||
init_per_suite(C) ->
|
||||
% dbg:tracer(), dbg:p(all, c),
|
||||
% dbg:tpl({ranch_server, '_', '_'}, x),
|
||||
Apps = genlib_app:start_application_with(woody, [{acceptors_pool_size, 1}]),
|
||||
{ok, Apps} = application:ensure_all_started(woody),
|
||||
[{suite_apps, Apps} | C].
|
||||
|
||||
end_per_suite(C) ->
|
||||
@ -94,7 +94,7 @@ respects_max_connections(C) ->
|
||||
% timeout is 5000 ms which is the same as the default woody request timeout.
|
||||
% I wonder how this behavior affects production traffic as most of woody servers there configured with
|
||||
% keepalive timeout of 60 s.
|
||||
TransportOpts = #{max_connections => MaxConns},
|
||||
TransportOpts = #{max_connections => MaxConns, num_acceptors => 1},
|
||||
ProtocolOpts = #{max_keepalive => 1},
|
||||
ReadBodyOpts = #{},
|
||||
{ok, ServerPid} = start_woody_server(Handler, TransportOpts, ProtocolOpts, ReadBodyOpts, C),
|
||||
|
Loading…
Reference in New Issue
Block a user