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

Do not use gen_mod:set_module_opt(s) in big tests #3398

Merged
merged 2 commits into from
Nov 17, 2021

Conversation

Premwoik
Copy link
Contributor

@Premwoik Premwoik commented Nov 15, 2021

This PR addresses MIM-1547 and removes usage of gen_mod:set_module_opt(s) in modules:

  • mam_SUITE
  • roster_helper(presence_SUITE and domain_removal_SUITE)

@mongoose-im

This comment has been minimized.

@codecov
Copy link

codecov bot commented Nov 15, 2021

Codecov Report

Merging #3398 (44ef957) into master (eacb079) will decrease coverage by 0.23%.
The diff coverage is n/a.

❗ Current head 44ef957 differs from pull request most recent head baf08cd. Consider uploading reports for the commit baf08cd to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3398      +/-   ##
==========================================
- Coverage   80.90%   80.67%   -0.24%     
==========================================
  Files         414      397      -17     
  Lines       32437    32199     -238     
==========================================
- Hits        26244    25976     -268     
- Misses       6193     6223      +30     
Impacted Files Coverage Δ
src/mod_roster_riak.erl 81.53% <0.00%> (-15.39%) ⬇️
src/mam/mod_mam_cassandra_prefs.erl 80.61% <0.00%> (-10.16%) ⬇️
src/gen_mod.erl 65.92% <0.00%> (-3.71%) ⬇️
src/wpool/mongoose_wpool_rdbms.erl 84.00% <0.00%> (-2.96%) ⬇️
src/domain/mongoose_domain_sql.erl 82.85% <0.00%> (-2.86%) ⬇️
...bal_distrib/mod_global_distrib_hosts_refresher.erl 75.47% <0.00%> (-1.89%) ⬇️
src/muc_light/mod_muc_light_db_mnesia.erl 88.54% <0.00%> (-0.94%) ⬇️
src/mod_commands.erl 92.56% <0.00%> (-0.52%) ⬇️
src/rdbms/mongoose_rdbms.erl 60.88% <0.00%> (-0.47%) ⬇️
.../mongoose_client_api/mongoose_client_api_rooms.erl 89.70% <0.00%> (-0.44%) ⬇️
... and 81 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update eacb079...baf08cd. Read the comment docs.

@mongoose-im

This comment has been minimized.

@Premwoik Premwoik force-pushed the do-not-set-module-opts-big-tests branch from 44ef957 to 770b749 Compare November 16, 2021 07:13
@mongoose-im

This comment has been minimized.

@Premwoik Premwoik force-pushed the do-not-set-module-opts-big-tests branch from 770b749 to c6183d1 Compare November 16, 2021 07:58
@mongoose-im

This comment has been minimized.

@Premwoik Premwoik marked this pull request as ready for review November 16, 2021 09:21
@NelsonVides
Copy link
Collaborator

What about the very functions gen_mod:set_module_opt(s)? Are they still being used from anywhere else or can we finally remove them? 😄

@Premwoik Premwoik force-pushed the do-not-set-module-opts-big-tests branch from c6183d1 to baf08cd Compare November 17, 2021 09:57
@mongoose-im
Copy link
Collaborator

mongoose-im commented Nov 17, 2021

small_tests_24 / small_tests / baf08cd
Reports root / small


internal_mnesia_24 / internal_mnesia / baf08cd
Reports root/ big
OK: 1587 / Failed: 0 / User-skipped: 297 / Auto-skipped: 0


small_tests_24 / small_tests / baf08cd
Reports root / small


internal_mnesia_24 / internal_mnesia / baf08cd
Reports root/ big
OK: 1587 / Failed: 0 / User-skipped: 297 / Auto-skipped: 0


small_tests_23 / small_tests / baf08cd
Reports root / small


dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / baf08cd
Reports root/ big
OK: 2722 / Failed: 0 / User-skipped: 186 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_24 / odbc_mssql_mnesia / baf08cd
Reports root/ big
OK: 2721 / Failed: 1 / User-skipped: 186 / Auto-skipped: 0

service_domain_db_SUITE:db:db_keeps_syncing_after_cluster_join
{error,{test_case_failed,{[<<"example1.com">>,<<"example2.com">>,
               <<"example3.com">>],
              [<<"example1.com">>,<<"example2.com">>,
               <<"example3.com">>,<<"example4.com">>]}}}

Report log


ldap_mnesia_24 / ldap_mnesia / baf08cd
Reports root/ big
OK: 1514 / Failed: 0 / User-skipped: 370 / Auto-skipped: 0


dynamic_domains_mysql_redis_24 / mysql_redis / baf08cd
Reports root/ big
OK: 2705 / Failed: 0 / User-skipped: 203 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_23 / pgsql_mnesia / baf08cd
Reports root/ big
OK: 2722 / Failed: 0 / User-skipped: 186 / Auto-skipped: 0


ldap_mnesia_23 / ldap_mnesia / baf08cd
Reports root/ big
OK: 1514 / Failed: 0 / User-skipped: 370 / Auto-skipped: 0


pgsql_mnesia_24 / pgsql_mnesia / baf08cd
Reports root/ big
OK: 3121 / Failed: 0 / User-skipped: 183 / Auto-skipped: 0


elasticsearch_and_cassandra_24 / elasticsearch_and_cassandra_mnesia / baf08cd
Reports root/ big
OK: 1892 / Failed: 0 / User-skipped: 297 / Auto-skipped: 0


pgsql_mnesia_23 / pgsql_mnesia / baf08cd
Reports root/ big
OK: 3121 / Failed: 0 / User-skipped: 183 / Auto-skipped: 0


mssql_mnesia_24 / odbc_mssql_mnesia / baf08cd
Reports root/ big
OK: 3121 / Failed: 0 / User-skipped: 183 / Auto-skipped: 0


mysql_redis_24 / mysql_redis / baf08cd
Reports root/ big
OK: 3104 / Failed: 0 / User-skipped: 200 / Auto-skipped: 0


riak_mnesia_24 / riak_mnesia / baf08cd
Reports root/ big
OK: 1738 / Failed: 0 / User-skipped: 298 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_24 / odbc_mssql_mnesia / baf08cd
Reports root/ big
OK: 2722 / Failed: 0 / User-skipped: 186 / Auto-skipped: 0

@NelsonVides
Copy link
Collaborator

What about the very functions gen_mod:set_module_opt(s)? Are they still being used from anywhere else or can we finally remove them? 😄

Just checked, and if I'm not mistaken, these functions are indeed not used anymore in all of the repo, so why not removing them finally? 😄

Copy link
Member

@chrzaszcz chrzaszcz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! I checked it and there are no calls to set_module_opt(s) in the tests anymore.

@chrzaszcz
Copy link
Member

What about the very functions gen_mod:set_module_opt(s)? Are they still being used from anywhere else or can we finally remove them? 😄

Just checked, and if I'm not mistaken, these functions are indeed not used anymore in all of the repo, so why not removing them finally? 😄

I agree, but maybe let's do it in a separate PR? Another follow-up would be to remove the usage of init_module from the tests including mam_SUITE.

@chrzaszcz chrzaszcz merged commit d7b9ec5 into master Nov 17, 2021
@chrzaszcz chrzaszcz deleted the do-not-set-module-opts-big-tests branch November 17, 2021 15:59
@Premwoik Premwoik modified the milestones: 5.1.0, 5.0.0 May 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants