-
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
Improve error handling in stat #3870
Conversation
small_tests_24 / small_tests / bc20e0c small_tests_25 / small_tests / bc20e0c dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / bc20e0c mongooseimctl_SUITE:stats:stats_global{error,
{badarg,
[{erlang,list_to_integer,
["{ok,660}"],
[{error_info,#{module => erl_erts_errors}}]},
{mongooseimctl_SUITE,'-stats_global/1-fun-0-',3,
[{file,
"/home/circleci/project/big_tests/tests/mongooseimctl_SUITE.erl"},
{line,1118}]},
{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,1783}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1292}]},
{test_server,run_test_case_eval,9,
[{file,"test_server.erl"},{line,1224}]}]}} ldap_mnesia_24 / ldap_mnesia / bc20e0c dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / bc20e0c mongooseimctl_SUITE:stats:stats_global{error,
{badarg,
[{erlang,list_to_integer,
["{ok,652}"],
[{error_info,#{module => erl_erts_errors}}]},
{mongooseimctl_SUITE,'-stats_global/1-fun-0-',3,
[{file,
"/home/circleci/project/big_tests/tests/mongooseimctl_SUITE.erl"},
{line,1118}]},
{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}]}]}} dynamic_domains_mysql_redis_25 / mysql_redis / bc20e0c mongooseimctl_SUITE:stats:stats_global{error,
{badarg,
[{erlang,list_to_integer,
["{ok,666}"],
[{error_info,#{module => erl_erts_errors}}]},
{mongooseimctl_SUITE,'-stats_global/1-fun-0-',3,
[{file,
"/home/circleci/project/big_tests/tests/mongooseimctl_SUITE.erl"},
{line,1118}]},
{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}]}]}} ldap_mnesia_25 / ldap_mnesia / bc20e0c dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / bc20e0c mongooseimctl_SUITE:stats:stats_global{error,
{badarg,
[{erlang,list_to_integer,
["{ok,714}"],
[{error_info,#{module => erl_erts_errors}}]},
{mongooseimctl_SUITE,'-stats_global/1-fun-0-',3,
[{file,
"/home/circleci/project/big_tests/tests/mongooseimctl_SUITE.erl"},
{line,1118}]},
{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}]}]}} pgsql_mnesia_24 / pgsql_mnesia / bc20e0c mongooseimctl_SUITE:stats:stats_global{error,
{badarg,
[{erlang,list_to_integer,
["{ok,722}"],
[{error_info,#{module => erl_erts_errors}}]},
{mongooseimctl_SUITE,'-stats_global/1-fun-0-',3,
[{file,
"/home/circleci/project/big_tests/tests/mongooseimctl_SUITE.erl"},
{line,1118}]},
{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,1783}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1292}]},
{test_server,run_test_case_eval,9,
[{file,"test_server.erl"},{line,1224}]}]}} pep_SUITE:pep_tests:unsubscribe_after_presence_unsubscription{error,
{{badmatch,
[{xmlel,<<"message">>,
[{<<"from">>,
<<"alice_unsubscribe_after_presence_unsubscription_2606@localhost">>},
{<<"to">>,
<<"bob_unsubscribe_after_presence_unsubscription_2606@localhost/res1">>},
{<<"type">>,<<"headline">>}],
[{xmlel,<<"event">>,
[{<<"xmlns">>,
<<"http://jabber.org/protocol/pubsub#event">>}],
[{xmlel,<<"items">>,
[{<<"node">>,<<"tVVFik85fQTm0hEsp453dg==">>}],
[{xmlel,<<"item">>,
[{<<"id">>,<<"salmon">>}],
[{xmlel,<<"entry">>,
[{<<"xmlns">>,
<<"http://www.w3.org/2005/Atom">>}],
[]}]}]}]},
{xmlel,<<"headers">>,
[{<<"xmlns">>,<<"http://jabber.org/protocol/shim">>}],
[]}]}]},
[{pep_SUITE,'-unsubscribe_after_presence_unsubscription/1-fun-0-',2,
[{file,"/home/circleci/project/big_tests/tests/pep_SUITE.erl"},
{line,384}]},
{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,1783}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1292}]},
{test_server,run_test_case_eval,9,
[{file,"test_server.erl"},{line,1224}]}]}} internal_mnesia_25 / internal_mnesia / bc20e0c mongooseimctl_SUITE:stats:stats_global{error,
{badarg,
[{erlang,list_to_integer,
["{ok,715}"],
[{error_info,#{module => erl_erts_errors}}]},
{mongooseimctl_SUITE,'-stats_global/1-fun-0-',3,
[{file,
"/home/circleci/project/big_tests/tests/mongooseimctl_SUITE.erl"},
{line,1118}]},
{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}]}]}} elasticsearch_and_cassandra_25 / elasticsearch_and_cassandra_mnesia / bc20e0c mongooseimctl_SUITE:stats:stats_global{error,
{badarg,
[{erlang,list_to_integer,
["{ok,707}"],
[{error_info,#{module => erl_erts_errors}}]},
{mongooseimctl_SUITE,'-stats_global/1-fun-0-',3,
[{file,
"/home/circleci/project/big_tests/tests/mongooseimctl_SUITE.erl"},
{line,1118}]},
{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}]}]}} riak_mnesia_24 / riak_mnesia / bc20e0c mongooseimctl_SUITE:stats:stats_global{error,
{badarg,
[{erlang,list_to_integer,
["{ok,837}"],
[{error_info,#{module => erl_erts_errors}}]},
{mongooseimctl_SUITE,'-stats_global/1-fun-0-',3,
[{file,
"/home/circleci/project/big_tests/tests/mongooseimctl_SUITE.erl"},
{line,1118}]},
{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,1783}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1292}]},
{test_server,run_test_case_eval,9,
[{file,"test_server.erl"},{line,1224}]}]}} pgsql_mnesia_25 / pgsql_mnesia / bc20e0c mongooseimctl_SUITE:stats:stats_global{error,
{badarg,
[{erlang,list_to_integer,
["{ok,749}"],
[{error_info,#{module => erl_erts_errors}}]},
{mongooseimctl_SUITE,'-stats_global/1-fun-0-',3,
[{file,
"/home/circleci/project/big_tests/tests/mongooseimctl_SUITE.erl"},
{line,1118}]},
{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}]}]}} mysql_redis_25 / mysql_redis / bc20e0c mongooseimctl_SUITE:stats:stats_global{error,
{badarg,
[{erlang,list_to_integer,
["{ok,798}"],
[{error_info,#{module => erl_erts_errors}}]},
{mongooseimctl_SUITE,'-stats_global/1-fun-0-',3,
[{file,
"/home/circleci/project/big_tests/tests/mongooseimctl_SUITE.erl"},
{line,1118}]},
{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}]}]}} mssql_mnesia_25 / odbc_mssql_mnesia / bc20e0c mongooseimctl_SUITE:stats:stats_global{error,
{badarg,
[{erlang,list_to_integer,
["{ok,870}"],
[{error_info,#{module => erl_erts_errors}}]},
{mongooseimctl_SUITE,'-stats_global/1-fun-0-',3,
[{file,
"/home/circleci/project/big_tests/tests/mongooseimctl_SUITE.erl"},
{line,1118}]},
{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}]}]}} |
Codecov ReportBase: 83.12% // Head: 83.14% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #3870 +/- ##
==========================================
+ Coverage 83.12% 83.14% +0.01%
==========================================
Files 535 535
Lines 34164 34174 +10
==========================================
+ Hits 28400 28413 +13
+ Misses 5764 5761 -3
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. |
bc20e0c
to
afb5249
Compare
small_tests_24 / small_tests / afb5249 small_tests_25 / small_tests / afb5249 ldap_mnesia_24 / ldap_mnesia / afb5249 dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / afb5249 dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / afb5249 dynamic_domains_mysql_redis_25 / mysql_redis / afb5249 muc_SUITE:hibernation:hibernated_room_can_be_queried_for_archive{error,{{assertion_failed,assert,is_groupchat_message,
[<<"Restorable message">>],
undefined,"undefined"},
[{escalus_new_assert,assert_true,2,
[{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_new_assert.erl"},
{line,84}]},
{muc_SUITE,wait_for_mam_result,3,
[{file,"/home/circleci/project/big_tests/tests/muc_SUITE.erl"},
{line,4394}]},
{muc_SUITE,'-hibernated_room_can_be_queried_for_archive/1-fun-0-',3,
[{file,"/home/circleci/project/big_tests/tests/muc_SUITE.erl"},
{line,4130}]},
{escalus_story,story,4,
[{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
{line,72}]},
{muc_SUITE,hibernated_room_can_be_queried_for_archive,1,
[{file,"/home/circleci/project/big_tests/tests/muc_SUITE.erl"},
{line,4126}]},
{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}]}]}} ldap_mnesia_25 / ldap_mnesia / afb5249 dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / afb5249 internal_mnesia_25 / internal_mnesia / afb5249 pgsql_mnesia_24 / pgsql_mnesia / afb5249 elasticsearch_and_cassandra_25 / elasticsearch_and_cassandra_mnesia / afb5249 riak_mnesia_24 / riak_mnesia / afb5249 mysql_redis_25 / mysql_redis / afb5249 pgsql_mnesia_25 / pgsql_mnesia / afb5249 mssql_mnesia_25 / odbc_mssql_mnesia / afb5249 dynamic_domains_mysql_redis_25 / mysql_redis / afb5249 |
@@ -12,6 +12,12 @@ | |||
-include("jlib.hrl"). | |||
|
|||
execute(_Ctx, Domain, <<"registeredUsers">>, _Args) -> | |||
{ok, stats_api:stats(<<"registeredusers">>, Domain)}; | |||
globalStats(<<"registeredusers">>, Domain); |
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.
globalStats(<<"registeredusers">>, Domain); | |
domainStats(<<"registeredusers">>, Domain); |
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.
I think the function name "globalStats" here is a bit misleading, because the stats called here are domain stats.
execute(_Ctx, Domain, <<"onlineUsers">>, _Args) -> | ||
{ok, stats_api:stats(<<"onlineusers">>, Domain)}. | ||
globalStats(<<"onlineusers">>, Domain). |
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.
globalStats(<<"onlineusers">>, Domain). | |
domainStats(<<"onlineusers">>, Domain). |
{ok, stats_api:stats(<<"onlineusers">>, Domain)}. | ||
globalStats(<<"onlineusers">>, Domain). | ||
|
||
globalStats(Name, Domain) -> |
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.
globalStats(Name, Domain) -> | |
domainStats(Name, Domain) -> |
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.
Looks good, I've added one minor suggestion.
afb5249
to
453fc74
Compare
small_tests_24 / small_tests / 453fc74 small_tests_25 / small_tests / 453fc74 dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 453fc74 ldap_mnesia_24 / ldap_mnesia / 453fc74 ldap_mnesia_25 / ldap_mnesia / 453fc74 dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / 453fc74 dynamic_domains_mysql_redis_25 / mysql_redis / 453fc74 pgsql_mnesia_24 / pgsql_mnesia / 453fc74 dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / 453fc74 elasticsearch_and_cassandra_25 / elasticsearch_and_cassandra_mnesia / 453fc74 pgsql_mnesia_25 / pgsql_mnesia / 453fc74 pep_SUITE:pep_tests:unsubscribe_after_presence_unsubscription{error,
{{badmatch,
[{xmlel,<<"message">>,
[{<<"from">>,
<<"alice_unsubscribe_after_presence_unsubscription_2656@localhost">>},
{<<"to">>,
<<"bob_unsubscribe_after_presence_unsubscription_2656@localhost/res1">>},
{<<"type">>,<<"headline">>}],
[{xmlel,<<"event">>,
[{<<"xmlns">>,
<<"http://jabber.org/protocol/pubsub#event">>}],
[{xmlel,<<"items">>,
[{<<"node">>,<<"3+XVxjjMWLKVWqgmbOHtqQ==">>}],
[{xmlel,<<"item">>,
[{<<"id">>,<<"salmon">>}],
[{xmlel,<<"entry">>,
[{<<"xmlns">>,
<<"http://www.w3.org/2005/Atom">>}],
[]}]}]}]},
{xmlel,<<"headers">>,
[{<<"xmlns">>,<<"http://jabber.org/protocol/shim">>}],
[]}]}]},
[{pep_SUITE,'-unsubscribe_after_presence_unsubscription/1-fun-0-',2,
[{file,"/home/circleci/project/big_tests/tests/pep_SUITE.erl"},
{line,384}]},
{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}]}]}} mysql_redis_25 / mysql_redis / 453fc74 mssql_mnesia_25 / odbc_mssql_mnesia / 453fc74 riak_mnesia_24 / riak_mnesia / 453fc74 internal_mnesia_25 / internal_mnesia / 453fc74 |
Improve error handling in stat