Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extending push_integration_SUITE #3937

Merged
merged 1 commit into from
Jan 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 20 additions & 8 deletions big_tests/tests/push_integration_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ groups() ->
G = [
{pubsub_ful, [], basic_groups()},
{pubsub_less, [], basic_groups()},
{integration_with_sm_and_offline_storage,[parallel],
{integration_with_sm_and_offline_storage,[],
[
no_duplicates_default_plugin,
sm_unack_messages_notified_default_plugin
Expand All @@ -63,7 +63,7 @@ groups() ->
immediate_notification,
double_notification_with_two_sessions_in_resume
]},
{pm_msg_notifications, [parallel],
{pm_msg_notifications, [],
[
pm_msg_notify_on_apns_w_high_priority,
pm_msg_notify_on_fcm_w_high_priority,
Expand All @@ -77,7 +77,7 @@ groups() ->
pm_msg_notify_on_fcm_silent,
pm_msg_notify_on_apns_w_topic
]},
{muclight_msg_notifications, [parallel],
{muclight_msg_notifications, [],
[
muclight_msg_notify_on_apns_w_high_priority,
muclight_msg_notify_on_fcm_w_high_priority,
Expand All @@ -91,22 +91,22 @@ groups() ->
muclight_msg_notify_on_fcm_silent,
muclight_msg_notify_on_w_topic
]},
{groupchat_notifications_with_inbox, [parallel],
{groupchat_notifications_with_inbox, [],
[
muclight_inbox_msg_unread_count_apns,
muclight_inbox_msg_unread_count_fcm,
muclight_aff_change_fcm,
muclight_aff_change_apns
]},
{pm_notifications_with_inbox, [parallel],
{pm_notifications_with_inbox, [],
[
inbox_msg_unread_count_apns,
inbox_msg_unread_count_fcm,
inbox_msg_reset_unread_count_apns,
inbox_msg_reset_unread_count_fcm
]},
{failure_cases_v3, [parallel], failure_cases()},
{failure_cases_v2, [parallel], failure_cases()},
{failure_cases_v3, [], failure_cases()},
{failure_cases_v2, [], failure_cases()},
{disco, [],
[
push_notifications_listed_disco_when_available,
Expand Down Expand Up @@ -181,13 +181,25 @@ init_per_testcase(CaseName = push_notifications_listed_disco_when_available, Con
init_modules(disco, Config),
escalus:init_per_testcase(CaseName, Config);
init_per_testcase(CaseName, Config) ->
%% unfortunately meck:reset(Module) doesn't result
%% in 'valid' flag resetting (see meck_proc module),
%% so we have to unload existing mocking and mock
%% module again before running every test case.
catch rpc(?RPC_SPEC, meck, unload, [mod_event_pusher]),
rpc(?RPC_SPEC, meck, new, [mod_event_pusher, [no_link, passthrough]]),
escalus:init_per_testcase(CaseName, Config).

end_per_testcase(CaseName = push_notifications_listed_disco_when_available, Config) ->
dynamic_modules:restore_modules(Config),
escalus:end_per_testcase(CaseName, Config);
end_per_testcase(CaseName, Config) ->
escalus:end_per_testcase(CaseName, Config).
Valid = rpc(?RPC_SPEC, meck, validate, [mod_event_pusher]),
rpc(?RPC_SPEC, meck, unload, [mod_event_pusher]),
escalus:end_per_testcase(CaseName, Config),
case Valid of
false -> {fail, "mod_event_pusher crashed"};
true -> ok
end.

%%------------------------------------------------------------------------------------
%% GROUP integration_with_sm_and_offline_storage & enhanced_integration_with_sm
Expand Down