Skip to content

Commit

Permalink
Code review follow-up
Browse files Browse the repository at this point in the history
  • Loading branch information
pawlooss1 committed Jan 5, 2024
1 parent 84f79d7 commit b2ad71e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 6 additions & 6 deletions big_tests/tests/rest_client_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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()},
Expand All @@ -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,
Expand Down Expand Up @@ -154,18 +154,18 @@ 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) ->
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.
Expand Down
2 changes: 2 additions & 0 deletions test/config_parser_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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) ->
Expand Down

0 comments on commit b2ad71e

Please sign in to comment.