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

C2S/fix muc_light_legacy tests #3927

Merged
merged 3 commits into from
Jan 11, 2023

Conversation

chrzaszcz
Copy link
Member

@chrzaszcz chrzaszcz commented Jan 10, 2023

The goal is to make muc_light_legacy_SUITE pass with the new mongoose_c2s.

The new c2s implementation requires proper addressing of the stanzas, so the tests are amended according to https://esl.github.io/MongooseDocs/latest/open-extensions/muc_light/#451-requesting-a-blocking-list

There is also a small fix in the code.

The 'to' attribute is described in the MUC Light XEP.

Also: remove test repetition, we are getting rid of it.
Previous code was adding the MUC prefix to an already prefixed domain.
This resulted in a double prefix in the recently fixed test cases.
@chrzaszcz chrzaszcz changed the base branch from master to feature/mongoose_c2s January 10, 2023 15:01
@mongoose-im
Copy link
Collaborator

mongoose-im commented Jan 10, 2023

small_tests_24 / small_tests / e3bf0f2
Reports root / small


small_tests_25 / small_tests / e3bf0f2
Reports root / small


ldap_mnesia_24 / ldap_mnesia / e3bf0f2
Reports root/ big
OK: 2122 / Failed: 0 / User-skipped: 803 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / e3bf0f2
Reports root/ big
OK: 4163 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


ldap_mnesia_25 / ldap_mnesia / e3bf0f2
Reports root/ big
OK: 2122 / Failed: 0 / User-skipped: 803 / Auto-skipped: 0


pgsql_mnesia_24 / pgsql_mnesia / e3bf0f2
Reports root/ big
OK: 4430 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0


dynamic_domains_mysql_redis_25 / mysql_redis / e3bf0f2
Reports root/ big
OK: 4137 / Failed: 0 / User-skipped: 114 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / e3bf0f2
Reports root/ big
OK: 4163 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / e3bf0f2
Reports root/ big
OK: 4159 / Failed: 4 / User-skipped: 88 / Auto-skipped: 0

smart_markers_SUITE:regular:one2one:repeated_markers_produce_no_warnings
{error,
  {timeout_when_waiting_for_stanza,
    [{escalus_client,wait_for_stanza,
       [{client,
          <<"alice_repeated_markers_produce_no_warnings_2720@domain.example.com/res1">>,
          escalus_tcp,<0.31672.2>,
          [{event_manager,<0.31656.2>},
           {server,<<"domain.example.com">>},
           {username,
             <<"alicE_repeated_markers_produce_no_warnings_2720">>},
           {resource,<<"res1">>}],
          [{event_client,
             [{event_manager,<0.31656.2>},
            {server,<<"domain.example.com">>},
            {username,
              <<"alicE_repeated_markers_produce_no_warnings_2720">>},
            {resource,<<"res1">>}]},
           {resource,<<"res1">>},
           {username,
             <<"alice_repeated_markers_produce_no_warnings_2720">>},
           {server,<<"domain.example.com">>},
           {host,<<"localhost">>},
           {port,5222},
           {auth,{escalus_auth,auth_plain}},
           {wspath,undefined},
           {username,
             <<"alicE_repeated_markers_produce_no_warnings_2720">>},
           {server,<<"domain.example.com">>},
           {host,<<"localhost">>},
           {password,<<"matygrysa">>},
           {stream_id,<<"6dac7afa17c04d87">>}]},
        5000],
       [{file,
          "/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_client.erl"},
        {line,136}]},
     {smart_markers_SUITE,
       '-repeated_markers_produce_no_warnings/1-fun-1-',2,
       [{file,
   ...

Report log

smart_markers_SUITE:regular:one2one:marker_after_timestamp_for_threadid_can_be_fetched
{error,
  {timeout_when_waiting_for_stanza,
    [{escalus_client,wait_for_stanza,
       [{client,
          <<"alice_marker_after_timestamp_for_threadid_can_be_fetched_2719@domain.example.com/res1">>,
          escalus_tcp,<0.31679.2>,
          [{event_manager,<0.31654.2>},
           {server,<<"domain.example.com">>},
           {username,
             <<"alicE_marker_after_timestamp_for_threadid_can_be_fetched_2719">>},
           {resource,<<"res1">>}],
          [{event_client,
             [{event_manager,<0.31654.2>},
            {server,<<"domain.example.com">>},
            {username,
              <<"alicE_marker_after_timestamp_for_threadid_can_be_fetched_2719">>},
            {resource,<<"res1">>}]},
           {resource,<<"res1">>},
           {username,
             <<"alice_marker_after_timestamp_for_threadid_can_be_fetched_2719">>},
           {server,<<"domain.example.com">>},
           {host,<<"localhost">>},
           {port,5222},
           {auth,{escalus_auth,auth_plain}},
           {wspath,undefined},
           {username,
             <<"alicE_marker_after_timestamp_for_threadid_can_be_fetched_2719">>},
           {server,<<"domain.example.com">>},
           {host,<<"localhost">>},
           {password,<<"matygrysa">>},
           {stream_id,<<"26e82c01bf1c834b">>}]},
        5000],
       [{file,
          "/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_client.erl"},
        {line,136}]},
     {smart_markers_SUITE,
       ...

Report log

smart_markers_SUITE:regular:one2one:remove_markers_when_removed_user
{error,{{badrpc,timeout},
    [{distributed_helper,rpc,
               [#{node => mongooseim@localhost},
                ejabberd_auth,remove_user,
                [{jid,<<"bob_remove_markers_when_removed_user_2717">>,
                  <<"domain.example.com">>,<<>>}]],
               [{file,"/home/circleci/project/big_tests/tests/distributed_helper.erl"},
                {line,121}]},
     {smart_markers_SUITE,'-remove_markers_when_removed_user/1-fun-2-',2,
                [{file,"/home/circleci/project/big_tests/tests/smart_markers_SUITE.erl"},
                 {line,245}]},
     {escalus_story,story,4,
            [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
             {line,72}]},
     {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1782}]},
     {test_server,run_test_case_eval1,6,
            [{file,"test_server.erl"},{line,1291}]},
     {test_server,run_test_case_eval,9,
            [{file,"test_server.erl"},{line,1223}]}]}}

Report log

smart_markers_SUITE:regular:one2one:marker_after_timestamp_can_be_fetched
{error,
  {timeout_when_waiting_for_stanza,
    [{escalus_client,wait_for_stanza,
       [{client,
          <<"alice_marker_after_timestamp_can_be_fetched_2718@domain.example.com/res1">>,
          escalus_tcp,<0.31670.2>,
          [{event_manager,<0.31642.2>},
           {server,<<"domain.example.com">>},
           {username,
             <<"alicE_marker_after_timestamp_can_be_fetched_2718">>},
           {resource,<<"res1">>}],
          [{event_client,
             [{event_manager,<0.31642.2>},
            {server,<<"domain.example.com">>},
            {username,
              <<"alicE_marker_after_timestamp_can_be_fetched_2718">>},
            {resource,<<"res1">>}]},
           {resource,<<"res1">>},
           {username,
             <<"alice_marker_after_timestamp_can_be_fetched_2718">>},
           {server,<<"domain.example.com">>},
           {host,<<"localhost">>},
           {port,5222},
           {auth,{escalus_auth,auth_plain}},
           {wspath,undefined},
           {username,
             <<"alicE_marker_after_timestamp_can_be_fetched_2718">>},
           {server,<<"domain.example.com">>},
           {host,<<"localhost">>},
           {password,<<"matygrysa">>},
           {stream_id,<<"6cd0f2481436082c">>}]},
        5000],
       [{file,
          "/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_client.erl"},
        {line,136}]},
     {smart_markers_SUITE,
       '-marker_after_timestamp_can_be_fetched/1-fun-0-',2,
       [{fil...

Report log


internal_mnesia_25 / internal_mnesia / e3bf0f2
Reports root/ big
OK: 2264 / Failed: 0 / User-skipped: 661 / Auto-skipped: 0


elasticsearch_and_cassandra_25 / elasticsearch_and_cassandra_mnesia / e3bf0f2
Reports root/ big
OK: 2622 / Failed: 0 / User-skipped: 642 / Auto-skipped: 0


riak_mnesia_24 / riak_mnesia / e3bf0f2
Reports root/ big
OK: 2460 / Failed: 0 / User-skipped: 634 / Auto-skipped: 0


pgsql_mnesia_25 / pgsql_mnesia / e3bf0f2
Reports root/ big
OK: 4430 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0


mysql_redis_25 / mysql_redis / e3bf0f2
Reports root/ big
OK: 4416 / Failed: 0 / User-skipped: 111 / Auto-skipped: 0


mssql_mnesia_25 / odbc_mssql_mnesia / e3bf0f2
Reports root/ big
OK: 4430 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / e3bf0f2
Reports root/ big
OK: 4163 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0

@codecov
Copy link

codecov bot commented Jan 10, 2023

Codecov Report

Base: 79.99% // Head: 80.40% // Increases project coverage by +0.41% 🎉

Coverage data is based on head (e3bf0f2) compared to base (00ad413).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@                   Coverage Diff                    @@
##           feature/mongoose_c2s    #3927      +/-   ##
========================================================
+ Coverage                 79.99%   80.40%   +0.41%     
========================================================
  Files                       540      540              
  Lines                     34198    34198              
========================================================
+ Hits                      27356    27498     +142     
+ Misses                     6842     6700     -142     
Impacted Files Coverage Δ
src/muc_light/mod_muc_light_codec_legacy.erl 90.86% <100.00%> (+79.69%) ⬆️
src/event_pusher/mod_event_pusher_sns.erl 82.19% <0.00%> (-12.33%) ⬇️
src/mongoose_cleaner.erl 60.00% <0.00%> (-10.00%) ⬇️
src/async_pools/mongoose_aggregator_worker.erl 63.33% <0.00%> (-5.01%) ⬇️
src/mam/mod_mam_muc_rdbms_arch_async.erl 82.85% <0.00%> (-2.86%) ⬇️
src/pubsub/node_pep.erl 72.22% <0.00%> (-1.86%) ⬇️
src/inbox/mod_inbox.erl 83.63% <0.00%> (-1.37%) ⬇️
src/inbox/mod_inbox_rdbms.erl 88.52% <0.00%> (-0.55%) ⬇️
src/ejabberd_sm.erl 86.36% <0.00%> (-0.33%) ⬇️
src/pubsub/mod_pubsub_db_rdbms.erl 94.31% <0.00%> (-0.26%) ⬇️
... and 6 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@chrzaszcz chrzaszcz marked this pull request as ready for review January 11, 2023 16:32
@chrzaszcz chrzaszcz changed the title C2S/fix remaining tests C2S/fix muc_light_legacy tests Jan 11, 2023
Copy link
Collaborator

@NelsonVides NelsonVides left a comment

Choose a reason for hiding this comment

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

Excellent 😄

@NelsonVides NelsonVides merged commit 7f34b4c into feature/mongoose_c2s Jan 11, 2023
@NelsonVides NelsonVides deleted the c2s/fix-remaining-tests branch January 11, 2023 16:38
@jacekwegr jacekwegr added this to the 6.1.0 milestone Apr 27, 2023
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.

4 participants