diff --git a/test/ejabberd_SUITE.erl b/test/ejabberd_SUITE.erl index ef94e67763c..ebca51fa15b 100644 --- a/test/ejabberd_SUITE.erl +++ b/test/ejabberd_SUITE.erl @@ -100,6 +100,7 @@ do_init_per_group(mysql, Config) -> {selected, _, _} -> mod_muc:shutdown_rooms(?MYSQL_VHOST), update_sql(?MYSQL_VHOST, Config), + stop_temporary_modules(?MYSQL_VHOST), set_opt(server, ?MYSQL_VHOST, Config); Err -> {skip, {mysql_not_available, Err}} @@ -109,6 +110,7 @@ do_init_per_group(mssql, Config) -> {selected, _, _} -> mod_muc:shutdown_rooms(?MSSQL_VHOST), update_sql(?MSSQL_VHOST, Config), + stop_temporary_modules(?MSSQL_VHOST), set_opt(server, ?MSSQL_VHOST, Config); Err -> {skip, {mssql_not_available, Err}} @@ -118,6 +120,7 @@ do_init_per_group(pgsql, Config) -> {selected, _, _} -> mod_muc:shutdown_rooms(?PGSQL_VHOST), update_sql(?PGSQL_VHOST, Config), + stop_temporary_modules(?PGSQL_VHOST), set_opt(server, ?PGSQL_VHOST, Config); Err -> {skip, {pgsql_not_available, Err}} @@ -161,6 +164,10 @@ do_init_per_group(GroupName, Config) -> _ -> NewConfig end. +stop_temporary_modules(Host) -> + Modules = [mod_shared_roster], + [gen_mod:stop_module(Host, M) || M <- Modules]. + end_per_group(mnesia, _Config) -> ok; end_per_group(redis, _Config) -> @@ -1094,7 +1101,17 @@ clear_table_queries(Queries) -> fun(Query, Acc) -> case split(str:to_lower(Query)) of [<<"create">>, <<"table">>, Table|_] -> - [<<"DELETE FROM ", Table/binary, ";">>|Acc]; + GlobalRamTables = [<<"bosh">>, + <<"oauth_client">>, + <<"oauth_token">>, + <<"proxy65">>, + <<"route">>], + case lists:member(Table, GlobalRamTables) of + true -> + Acc; + false -> + [<<"DELETE FROM ", Table/binary, ";">>|Acc] + end; _ -> Acc end diff --git a/test/ejabberd_SUITE_data/ejabberd.mssql.yml b/test/ejabberd_SUITE_data/ejabberd.mssql.yml index 1ecf77ba871..66bfee3f99e 100644 --- a/test/ejabberd_SUITE_data/ejabberd.mssql.yml +++ b/test/ejabberd_SUITE_data/ejabberd.mssql.yml @@ -69,3 +69,11 @@ Welcome to this XMPP server." mod_stats: [] mod_time: [] mod_version: [] + mod_mix: + db_type: sql + mod_mix_pam: + db_type: sql + mod_mqtt: + db_type: sql + mod_shared_roster: + db_type: sql diff --git a/test/ejabberd_SUITE_data/ejabberd.mysql.yml b/test/ejabberd_SUITE_data/ejabberd.mysql.yml index 411901976b4..abb0a6937ca 100644 --- a/test/ejabberd_SUITE_data/ejabberd.mysql.yml +++ b/test/ejabberd_SUITE_data/ejabberd.mysql.yml @@ -70,3 +70,11 @@ Welcome to this XMPP server." mod_stats: [] mod_time: [] mod_version: [] + mod_mix: + db_type: sql + mod_mix_pam: + db_type: sql + mod_mqtt: + db_type: sql + mod_shared_roster: + db_type: sql diff --git a/test/ejabberd_SUITE_data/ejabberd.pgsql.yml b/test/ejabberd_SUITE_data/ejabberd.pgsql.yml index c0cd0b0d656..014e1c058cc 100644 --- a/test/ejabberd_SUITE_data/ejabberd.pgsql.yml +++ b/test/ejabberd_SUITE_data/ejabberd.pgsql.yml @@ -70,3 +70,11 @@ Welcome to this XMPP server." mod_stats: [] mod_time: [] mod_version: [] + mod_mix: + db_type: sql + mod_mix_pam: + db_type: sql + mod_mqtt: + db_type: sql + mod_shared_roster: + db_type: sql