From b2ad71e4e311259c47ca11246e1225692659ebc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20D=C5=82ugosz?= Date: Fri, 5 Jan 2024 11:49:56 +0100 Subject: [PATCH] Code review follow-up --- big_tests/tests/rest_client_SUITE.erl | 12 ++++++------ test/config_parser_SUITE.erl | 2 ++ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/big_tests/tests/rest_client_SUITE.erl b/big_tests/tests/rest_client_SUITE.erl index e7c1df23689..0d67699e984 100644 --- a/big_tests/tests/rest_client_SUITE.erl +++ b/big_tests/tests/rest_client_SUITE.erl @@ -39,7 +39,7 @@ all() -> {group, messages_with_props}, {group, messages_with_thread}, {group, security}, - {group, sse}]. + {group, sse_timeout}]. groups() -> [{messages_with_props, [parallel], message_with_props_test_cases()}, @@ -50,7 +50,7 @@ groups() -> {muc_disabled, [parallel], muc_disabled_cases()}, {roster, [parallel], roster_test_cases()}, {security, [], security_test_cases()}, - {sse, [], [sse_should_not_get_timeout]}]. + {sse_timeout, [], [sse_should_not_get_timeout]}]. message_test_cases() -> [msg_is_sent_and_delivered_over_xmpp, @@ -154,9 +154,9 @@ init_per_group(muc_disabled = GN, Config) -> Config1 = dynamic_modules:save_modules(HostType, Config), dynamic_modules:ensure_modules(HostType, required_modules(GN)), Config1; -init_per_group(sse, Config) -> +init_per_group(sse_timeout, Config) -> % Change the default idle_timeout for the listener to 1s to test if sse will override it - Listener = get_client_api_listner(), + Listener = get_client_api_listener(), mongoose_helper:change_listener_idle_timeout(Listener, 1000), Config; init_per_group(_GN, Config) -> @@ -164,8 +164,8 @@ init_per_group(_GN, Config) -> end_per_group(muc_disabled, Config) -> dynamic_modules:restore_modules(Config); -end_per_group(sse, _Config) -> - Listener = get_client_api_listner(), +end_per_group(sse_timeout, _Config) -> + Listener = get_client_api_listener(), mongoose_helper:restart_listener(distributed_helper:mim(), Listener); end_per_group(_GN, _Config) -> ok. diff --git a/test/config_parser_SUITE.erl b/test/config_parser_SUITE.erl index 85ba31fa255..df06350058e 100644 --- a/test/config_parser_SUITE.erl +++ b/test/config_parser_SUITE.erl @@ -616,8 +616,10 @@ listen_http_handlers_graphql(_Config) -> test_listen_http_handler_creds(P, T), ?cfg(P ++ [allowed_categories], [<<"muc">>, <<"inbox">>], T(#{<<"allowed_categories">> => [<<"muc">>, <<"inbox">>]})), + ?cfg(P ++ [sse_idle_timeout], 3600000, T(#{})), ?err(T(#{<<"allowed_categories">> => [<<"invalid">>]})), ?err(T(#{<<"schema_endpoint">> => <<"wrong_endpoint">>})), + ?err(T(#{<<"sse_idle_timeout">> => 0})), ?err(http_handler_raw(mongoose_graphql_handler, #{})). test_listen_http_handler_creds(P, T) ->