-
Notifications
You must be signed in to change notification settings - Fork 428
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
Return a proper type from mod_muc:node_cleanup_for_host_type/3 #4122
Conversation
elasticsearch_and_cassandra_25 / elasticsearch_and_cassandra_mnesia / e5373fc small_tests_24 / small_tests / e5373fc small_tests_25_arm64 / small_tests / e5373fc small_tests_25 / small_tests / e5373fc ldap_mnesia_24 / ldap_mnesia / e5373fc dynamic_domains_mysql_redis_25 / mysql_redis / e5373fc ldap_mnesia_25 / ldap_mnesia / e5373fc dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / e5373fc dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / e5373fc dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / e5373fc internal_mnesia_25 / internal_mnesia / e5373fc pgsql_cets_25 / pgsql_cets / e5373fc mysql_redis_25 / mysql_redis / e5373fc pgsql_mnesia_24 / pgsql_mnesia / e5373fc pgsql_mnesia_25 / pgsql_mnesia / e5373fc mssql_mnesia_25 / odbc_mssql_mnesia / e5373fc |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #4122 +/- ##
==========================================
+ Coverage 83.90% 83.93% +0.03%
==========================================
Files 552 552
Lines 33630 33630
==========================================
+ Hits 28217 28228 +11
+ Misses 5413 5402 -11
☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks good, but why not put the tests in mongoose_cleanup_SUITE
(small tests), which was actually created for the purpose of testing node cleanup?
@chrzaszcz we could test it in mongoose_cleanup_SUITE, just would require a lot of mocking. We could even mock the hook handler, but in this case that test would pass without the fix :) mod_muc is not the module which is easy to start with no other deps (metrics, CETS, hooks, probably needs some storage (mnesia?) too. We could simplify the list by just maybe starting one hook or only hooks, but that would be easy to break and synthetic). Main reason there was no mod_muc small tests, so to write that test I would probably have to write a couple of sanity tests that when we start the mocked mod_muc, stuff kinda makes sense. And it is more of a regression test, not test to ensure data is actually removed (should be also done in the future ideally). |
e5373fc
to
009b120
Compare
Add small testcase Sadly, dialyzer didn't caught the bug
009b120
to
5ea7ec5
Compare
elasticsearch_and_cassandra_25 / elasticsearch_and_cassandra_mnesia / 5ea7ec5 small_tests_24 / small_tests / 5ea7ec5 small_tests_25 / small_tests / 5ea7ec5 small_tests_25_arm64 / small_tests / 5ea7ec5 ldap_mnesia_24 / ldap_mnesia / 5ea7ec5 ldap_mnesia_25 / ldap_mnesia / 5ea7ec5 dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 5ea7ec5 dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / 5ea7ec5 dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / 5ea7ec5 dynamic_domains_mysql_redis_25 / mysql_redis / 5ea7ec5 internal_mnesia_25 / internal_mnesia / 5ea7ec5 pgsql_cets_25 / pgsql_cets / 5ea7ec5 mysql_redis_25 / mysql_redis / 5ea7ec5 pgsql_mnesia_24 / pgsql_mnesia / 5ea7ec5 pgsql_mnesia_25 / pgsql_mnesia / 5ea7ec5 mssql_mnesia_25 / odbc_mssql_mnesia / 5ea7ec5 muc_SUITE:register:user_unregisters_nick{error,
{{assertion_failed,assert,is_iq_result,
[{xmlel,<<"iq">>,
[{<<"type">>,<<"set">>},
{<<"id">>,<<"43c45e6a50f8cd504ec08b6a082792f9">>},
{<<"to">>,<<"muc.localhost">>}],
[{xmlel,<<"query">>,
[{<<"xmlns">>,<<"jabber:iq:register">>}],
[{xmlel,<<"x">>,
[{<<"xmlns">>,<<"jabber:x:data">>},
{<<"type">>,<<"submit">>}],
[{xmlel,<<"field">>,
[{<<"type">>,<<"hidden">>},
{<<"var">>,<<"FORM_TYPE">>}],
[{xmlel,<<"value">>,[],
[{xmlcdata,<<"jabber:iq:register">>}]}]},
{xmlel,<<"field">>,
[{<<"type">>,<<"text-single">>},
{<<"var">>,<<"nick">>}],
[{xmlel,<<"value">>,[],
[{xmlcdata,
<<"thirdwitch1room-2d37787211">>}]}]}]}]}]}],
{xmlel,<<"iq">>,
[{<<"from">>,<<"muc.localhost">>},
{<<"to">>,<<"alice_user_unregisters_nick_2741@localhost/res1">>},
{<<"type">>,<<"error">>},
{<<"id">>,<<"43c45e6a50f8cd504ec08b6a082792f9">>}],
[{xmlel,<<"query">>,
[{<<"xmlns">>,<<"jabber:iq:register">>}],
[{xmlel,<<"x">>,
[{<<"xmlns">>,<<"jabber:x:data">>},
{<<"type">>,<<"submit">>}],
[{xmlel,<<"field">>,
[{<<"type">>,<<"hidden">>},
{<<"var">>,<<"FORM_TYPE">>}],
[{xmlel,<<"value">>,[],
[{xmlcdata... small_tests_24 / small_tests / 5ea7ec5 mssql_mnesia_25 / odbc_mssql_mnesia / 5ea7ec5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
This PR addresses MIM-2039 - Process crashes when another node stops during the upgrade.
Error:
Proposed changes include: