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

Readable errors in mongoose_commands #3346

Merged
merged 2 commits into from
Oct 20, 2021
Merged

Conversation

arcusfelis
Copy link
Contributor

This PR addresses "term_to_binary does not what you think".

Proposed changes include:

  • Print errors so they are readable
  • And test it.

@mongoose-im
Copy link
Collaborator

small_tests_24 / small_tests / d0bbe71
Reports root / small

@codecov
Copy link

codecov bot commented Oct 20, 2021

Codecov Report

Merging #3346 (5c4b0bd) into master (ba8bc97) will increase coverage by 0.03%.
The diff coverage is 80.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3346      +/-   ##
==========================================
+ Coverage   80.69%   80.72%   +0.03%     
==========================================
  Files         397      397              
  Lines       32434    32435       +1     
==========================================
+ Hits        26171    26184      +13     
+ Misses       6263     6251      -12     
Impacted Files Coverage Δ
src/ejabberd_ctl.erl 16.93% <0.00%> (ø)
src/mongoose_commands.erl 94.73% <100.00%> (+0.50%) ⬆️
src/mongoose_tcp_listener.erl 76.59% <0.00%> (-4.26%) ⬇️
src/mam/mod_mam_rdbms_async_pool_writer.erl 66.66% <0.00%> (-3.93%) ⬇️
...c/global_distrib/mod_global_distrib_server_mgr.erl 74.57% <0.00%> (-2.26%) ⬇️
src/domain/mongoose_domain_loader.erl 77.35% <0.00%> (-1.89%) ⬇️
src/global_distrib/mod_global_distrib_receiver.erl 78.88% <0.00%> (-1.12%) ⬇️
src/ejabberd_c2s.erl 89.22% <0.00%> (-0.08%) ⬇️
src/pubsub/mod_pubsub.erl 73.17% <0.00%> (-0.06%) ⬇️
src/ejabberd_sm.erl 84.74% <0.00%> (ø)
... and 6 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 ba8bc97...5c4b0bd. Read the comment docs.

@arcusfelis arcusfelis force-pushed the mu-readable-errors-in-commands branch from d0bbe71 to 5c4b0bd Compare October 20, 2021 10:11
@mongoose-im
Copy link
Collaborator

mongoose-im commented Oct 20, 2021

small_tests_24 / small_tests / 5c4b0bd
Reports root / small


internal_mnesia_24 / internal_mnesia / 5c4b0bd
Reports root/ big
OK: 1589 / Failed: 0 / User-skipped: 297 / Auto-skipped: 0


small_tests_23 / small_tests / 5c4b0bd
Reports root / small


dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 5c4b0bd
Reports root/ big
OK: 2702 / Failed: 0 / User-skipped: 184 / Auto-skipped: 0


ldap_mnesia_24 / ldap_mnesia / 5c4b0bd
Reports root/ big
OK: 1486 / Failed: 0 / User-skipped: 400 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_24 / odbc_mssql_mnesia / 5c4b0bd
Reports root/ big
OK: 2702 / Failed: 0 / User-skipped: 184 / Auto-skipped: 0


dynamic_domains_mysql_redis_24 / mysql_redis / 5c4b0bd
Reports root/ big
OK: 2685 / Failed: 0 / User-skipped: 201 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_23 / pgsql_mnesia / 5c4b0bd
Reports root/ big
OK: 2702 / Failed: 0 / User-skipped: 184 / Auto-skipped: 0


ldap_mnesia_23 / ldap_mnesia / 5c4b0bd
Reports root/ big
OK: 1486 / Failed: 0 / User-skipped: 400 / Auto-skipped: 0


pgsql_mnesia_24 / pgsql_mnesia / 5c4b0bd
Reports root/ big
OK: 3071 / Failed: 0 / User-skipped: 211 / Auto-skipped: 0


elasticsearch_and_cassandra_24 / elasticsearch_and_cassandra_mnesia / 5c4b0bd
Reports root/ big
OK: 1862 / Failed: 0 / User-skipped: 323 / Auto-skipped: 0


mysql_redis_24 / mysql_redis / 5c4b0bd
Reports root/ big
OK: 3060 / Failed: 1 / User-skipped: 228 / Auto-skipped: 0

mam_SUITE:rdbms_async_pool_prefs_cases:messages_filtered_when_prefs_default_policy_is_roster
{error,{test_case_failed,"ASSERT EQUAL\n\tExpected []\n\tValue [ok]\n"}}

Report log


pgsql_mnesia_23 / pgsql_mnesia / 5c4b0bd
Reports root/ big
OK: 3071 / Failed: 0 / User-skipped: 211 / Auto-skipped: 0


mssql_mnesia_24 / odbc_mssql_mnesia / 5c4b0bd
Reports root/ big
OK: 3071 / Failed: 0 / User-skipped: 211 / Auto-skipped: 0


riak_mnesia_24 / riak_mnesia / 5c4b0bd
Reports root/ big
OK: 1727 / Failed: 1 / User-skipped: 326 / Auto-skipped: 0

jingle_SUITE:all:jingle_session_is_established_with_a_conference_room
{error,
  {{assertion_failed,assert,is_iq_result,
     {xmlel,<<"iq">>,
       [{<<"from">>,<<"*[email protected]">>},
        {<<"to">>,
         <<"alice_jingle_session_is_established_with_a_conference_room_80.561135@localhost/res1">>},
        {<<"id">>,<<"2099baa6-dc25-4cd7-a333-8a0c5b543283">>},
        {<<"type">>,<<"set">>}],
       [{xmlel,<<"jingle">>,
          [{<<"xmlns">>,<<"urn:xmpp:jingle:1">>},
           {<<"action">>,<<"session-info">>},
           {<<"sid">>,<<"74acc75b-61ba-4675-a16e-79650cad851a">>}],
          [{xmlel,<<"ringing">>,
             [{<<"xmlns">>,<<"urn:xmpp:jingle:apps:rtp:info:1">>}],
             []}]}]},
     "<iq from='*[email protected]' to='alice_jingle_session_is_established_with_a_conference_room_80.561135@localhost/res1' id='2099baa6-dc25-4cd7-a333-8a0c5b543283' type='set'><jingle xmlns='urn:xmpp:jingle:1' action='session-info' sid='74acc75b-61ba-4675-a16e-79650cad851a'><ringing xmlns='urn:xmpp:jingle:apps:rtp:info:1'/></jingle></iq>"},
   [{escalus_new_assert,assert_true,2,
      [{file,
         "/home/circleci/app/big_tests/_build/default/lib/escalus/src/escalus_new_assert.erl"},
       {line,84}]},
    {jingle_SUITE,send_initiate_and_wait_for_first_iq_set,2,
      [{file,"/home/circleci/app/big_tests/tests/jingle_SUITE.erl"},
       {line,395}]},
    {jingle_SUITE,
      '-jingle_session_is_established_with_a_conference_room/1-fun-0-',1,
      [{file,"/home/circleci/app/big_tests/tests/jingle_SUITE.erl"},
       {line,1...

Report log

@vkatsuba vkatsuba merged commit 5a0883a into master Oct 20, 2021
@vkatsuba vkatsuba deleted the mu-readable-errors-in-commands branch October 20, 2021 14:02
@Premwoik Premwoik added this to the 5.1.0 milestone May 25, 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.

4 participants