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

Fix muc persistent room #3707

Merged
merged 2 commits into from
Jul 13, 2022
Merged

Fix muc persistent room #3707

merged 2 commits into from
Jul 13, 2022

Conversation

chrzaszcz
Copy link
Member

This PR addresses #3705: an instant persistent room was not stored in the DB.

Added missing test, and fixed the bug.

Paweł Chrząszcz added 2 commits July 13, 2022 09:06
When the rooms are persistent by default, creation of an instant room
should result in saving it into the DB.
This was not covered by tests - and it was not working.

Also:
- Remove reduntant empty lines
- Remove test repetition
This was a bug - the room was not saved.

Also: minor refactoring
@mongoose-im
Copy link
Collaborator

mongoose-im commented Jul 13, 2022

small_tests_24 / small_tests / 14afdb3
Reports root / small


small_tests_25 / small_tests / 14afdb3
Reports root / small


dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 14afdb3
Reports root/ big
OK: 3123 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


ldap_mnesia_24 / ldap_mnesia / 14afdb3
Reports root/ big
OK: 1740 / Failed: 0 / User-skipped: 460 / Auto-skipped: 0


dynamic_domains_mysql_redis_25 / mysql_redis / 14afdb3
Reports root/ big
OK: 3106 / Failed: 0 / User-skipped: 105 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / 14afdb3
Reports root/ big
OK: 3123 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


ldap_mnesia_25 / ldap_mnesia / 14afdb3
Reports root/ big
OK: 1740 / Failed: 0 / User-skipped: 460 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / 14afdb3
Reports root/ big
OK: 3122 / Failed: 1 / User-skipped: 88 / Auto-skipped: 0

muc_SUITE:register:user_unregisters_nick
{error,
  {{assertion_failed,assert,is_iq_result,
     [{xmlel,<<"iq">>,
        [{<<"type">>,<<"set">>},
         {<<"id">>,<<"8dc3b60c0815f90d6c25fcdae42e9031">>},
         {<<"to">>,<<"groupchats.domain.example.com">>}],
        [{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-c19e66ce63">>}]}]}]}]}]}],
     {xmlel,<<"iq">>,
       [{<<"from">>,<<"groupchats.domain.example.com">>},
        {<<"to">>,
         <<"alice_user_unregisters_nick_1982@domain.example.com/res1">>},
        {<<"type">>,<<"error">>},
        {<<"xml:lang">>,<<"en">>},
        {<<"id">>,<<"8dc3b60c0815f90d6c25fcdae42e9031">>}],
       [{xmlel,<<"query">>,
          [{<<"xmlns">>,<<"jabber:iq:register">>}],
          [{xmlel,<<"x">>,
             [{<<"xmlns">>,<<"jabber:x:data">>},
            {<<"type">>,<<"submit">>}],
             [{xmlel,<<"field">>,
              [{<<"type">>,<<"hidden">>},
               {<<"var">...

Report log


internal_mnesia_25 / internal_mnesia / 14afdb3
Reports root/ big
OK: 1846 / Failed: 0 / User-skipped: 354 / Auto-skipped: 0


pgsql_mnesia_24 / pgsql_mnesia / 14afdb3
Reports root/ big
OK: 3497 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0


elasticsearch_and_cassandra_25 / elasticsearch_and_cassandra_mnesia / 14afdb3
Reports root/ big
OK: 2136 / Failed: 0 / User-skipped: 355 / Auto-skipped: 0


pgsql_mnesia_25 / pgsql_mnesia / 14afdb3
Reports root/ big
OK: 3497 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0


riak_mnesia_24 / riak_mnesia / 14afdb3
Reports root/ big
OK: 1995 / Failed: 0 / User-skipped: 350 / Auto-skipped: 0


mysql_redis_25 / mysql_redis / 14afdb3
Reports root/ big
OK: 3492 / Failed: 0 / User-skipped: 102 / Auto-skipped: 0


mssql_mnesia_25 / odbc_mssql_mnesia / 14afdb3
Reports root/ big
OK: 3497 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / 14afdb3
Reports root/ big
OK: 3123 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0

@codecov
Copy link

codecov bot commented Jul 13, 2022

Codecov Report

Merging #3707 (14afdb3) into master (bbdc781) will increase coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #3707      +/-   ##
==========================================
+ Coverage   82.10%   82.13%   +0.02%     
==========================================
  Files         513      513              
  Lines       33644    33643       -1     
==========================================
+ Hits        27624    27632       +8     
+ Misses       6020     6011       -9     
Impacted Files Coverage Δ
src/mod_muc_room.erl 78.68% <100.00%> (-0.02%) ⬇️
src/pubsub/nodetree_tree.erl 87.87% <0.00%> (-3.04%) ⬇️
src/pubsub/node_flat.erl 74.30% <0.00%> (-0.40%) ⬇️
src/pubsub/mod_pubsub_db_rdbms.erl 95.34% <0.00%> (-0.26%) ⬇️
src/mod_muc_log.erl 62.82% <0.00%> (ø)
src/pubsub/mod_pubsub.erl 73.42% <0.00%> (+0.06%) ⬆️
src/pubsub/node_pep.erl 79.62% <0.00%> (+1.85%) ⬆️
src/metrics/mongoose_metrics.erl 92.47% <0.00%> (+2.15%) ⬆️
src/mam/mod_mam_muc_rdbms_arch_async.erl 85.71% <0.00%> (+2.85%) ⬆️
src/mongoose_tcp_listener.erl 72.34% <0.00%> (+4.25%) ⬆️
... and 1 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 bbdc781...14afdb3. Read the comment docs.

@chrzaszcz chrzaszcz marked this pull request as ready for review July 13, 2022 08:25
Copy link
Contributor

@JanuszJakubiec JanuszJakubiec 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

@JanuszJakubiec JanuszJakubiec merged commit 0fbad9e into master Jul 13, 2022
@JanuszJakubiec JanuszJakubiec deleted the fix-muc-persistent-room branch July 13, 2022 10:40
@chrzaszcz chrzaszcz added this to the 6.0.0 milestone Dec 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants