Skip to content

Commit

Permalink
Merge pull request #4286 from esl/instrument/fix_slow_mam_test
Browse files Browse the repository at this point in the history
Fix slow MAM muc_prefs_cases tests
  • Loading branch information
jacekwegr authored May 22, 2024
2 parents cd92518 + 41863b7 commit 02359b1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 7 additions & 0 deletions big_tests/tests/mam_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -3573,6 +3573,13 @@ muc_run_prefs_cases(DefaultPolicy, ConfigIn) ->
F = fun(Config, Alice, Bob, Kate) ->
%% Just send messages for each prefs configuration
Namespace = mam_ns_binary_v04(),

Room = ?config(room, Config),
escalus:send(Alice, stanza_muc_enter_room(Room, nick(Alice))),
escalus:send(Bob, stanza_muc_enter_room(Room, nick(Bob))),
escalus:send(Kate, stanza_muc_enter_room(Room, nick(Kate))),
escalus:wait_for_stanzas(Alice, 4),

Funs = [muc_run_prefs_case(Case, Namespace, Alice, Bob, Kate, Config)
|| Case <- prefs_cases2_muc(),
default_policy(Case) =:= DefaultPolicy],
Expand Down
4 changes: 0 additions & 4 deletions big_tests/tests/mam_helper.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1261,10 +1261,6 @@ run_prefs_case({PrefsState, ExpectedMessageStates}, Namespace, Alice, Bob, Kate,
muc_run_prefs_case({PrefsState, ExpectedMessageStates}, Namespace, Alice, Bob, Kate, Config) ->
Room = ?config(room, Config),
RoomAddr = room_address(Room),
escalus:send(Alice, stanza_muc_enter_room(Room, nick(Alice))),
escalus:send(Bob, stanza_muc_enter_room(Room, nick(Bob))),
escalus:send(Kate, stanza_muc_enter_room(Room, nick(Kate))),
escalus:wait_for_stanzas(Alice, 4),

{DefaultMode, AlwaysUsers, NeverUsers} = PrefsState,
IqSet = stanza_prefs_set_request_muc({DefaultMode, AlwaysUsers, NeverUsers, Namespace}, Config),
Expand Down

0 comments on commit 02359b1

Please sign in to comment.