Skip to content

Commit 6e5ed81

Browse files
committed
Use cached affiliations in GraphQL MUC Light tests
Manual checks revealed 59 DB queries instead of 131. This means that both the DB query and the cache lookup are tested.
1 parent a948ae0 commit 6e5ed81

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

big_tests/tests/graphql_muc_light_SUITE.erl

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
get_coercion_err_msg/1, make_creds/1, get_unauthorized/1,
1010
get_err_code/1, get_not_loaded/1]).
1111

12-
-import(config_parser_helper, [mod_config/2]).
12+
-import(config_parser_helper, [config/2]).
1313

1414
-include_lib("common_test/include/ct.hrl").
1515
-include_lib("jid/include/jid.hrl").
@@ -209,12 +209,15 @@ end_per_suite(Config) ->
209209
escalus:end_per_suite(Config).
210210

211211
required_modules(_) ->
212-
Backend = mongoose_helper:mnesia_or_rdbms_backend(),
213-
MucLightOpts = mod_config(mod_muc_light, #{backend => Backend,
214-
rooms_in_rosters => true,
215-
config_schema => custom_schema()}),
212+
MucLightOpts = config([modules, mod_muc_light], muc_light_opts()),
216213
[{mod_muc_light, MucLightOpts}].
217214

215+
muc_light_opts() ->
216+
#{backend => mongoose_helper:mnesia_or_rdbms_backend(),
217+
cache_affs => #{},
218+
rooms_in_rosters => true,
219+
config_schema => custom_schema()}.
220+
218221
custom_schema() ->
219222
%% Should be sorted
220223
[{<<"background">>, <<>>, background, binary},

0 commit comments

Comments
 (0)