Skip to content

Commit

Permalink
extending push_integration_SUITE
Browse files Browse the repository at this point in the history
  • Loading branch information
DenysGonchar committed Jan 25, 2023
1 parent ef6be9a commit 2ab9529
Showing 1 changed file with 20 additions and 8 deletions.
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

0 comments on commit 2ab9529

Please sign in to comment.