MIM-2669 Remove ejabberd router - #4695
Conversation
| T = <<"Local server does not implement this feature">>, | ||
| ejabberd_router:route_error_reply(To, From, Acc, | ||
| mongoose_xmpp_errors:feature_not_implemented(<<"en">>, T)) | ||
| {Acc1, Error} = jlib:make_error_reply(Acc, |
There was a problem hiding this comment.
I don't really like the way jlib:make_error_reply works, for the following reasons:
- it makes changes to the accumulator while it is a jlib, it is not supposed to mess with other things
- if we create a new acc with an error stanza the flag is not set, neither if we just update an acc with such stanza
I'd suggest removing this behaviour and instead check/set the flag in the accumulator when a new element is set (in mongoose_acc:update and update_stanza).
|
CircleCI results for e6a653a elasticsearch_and_cassandra_latest / elasticsearch_and_cassandra_mnesia / 7b161b7 mongoose_elasticsearch_SUITE:end_per_suite{error,
{{badrpc,
{'EXIT',
{#{what => event_already_registered,
labels => #{pool_tag => default,pool_type => elastic},
event_name => wpool_global_queue_lengths},
[{mongoose_instrument,set_up,3,
[{file,
"/home/circleci/project/src/instrument/mongoose_instrument.erl"},
{line,110}]},
{lists,foreach_1,2,[{file,"lists.erl"},{line,2641}]},
{mongoose_wpool,start,5,
[{file,
"/home/circleci/project/src/wpool/mongoose_wpool.erl"},
{line,162}]},
{mongoose_wpool,'-start_configured_pools/3-lc$^1/1-1-',1,
[{file,
"/home/circleci/project/src/wpool/mongoose_wpool.erl"},
{line,129}]},
{mongoose_wpool,start_configured_pools,1,[]}]}}},
[{distributed_helper,rpc,
[#{node => mongooseim@localhost},
mongoose_wpool,start_configured_pools,
[[#{scope => global,tag => default,type => elastic,
opts =>
#{strategy => best_worker,workers => 10,
call_timeout => 5000},
conn_opts => #{port => 9200,host => <<"localhost">>}}]]],
[{file,
"/home/circleci/project/big_tests/../test/common/distributed_helper.erl"},
{line,143}]},
{test_server,ts_tc,3,[{file,"test_server.erl"},{line,1796}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1393}]},
{test_server,run_test_case_eval,9,
[{file,"test_server.erl"},{line,1237}]}]}...small_tests_latest / small_tests / 7b161b7 small_tests_legacy / small_tests / 7b161b7 small_tests_latest_arm64 / small_tests / 7b161b7 ldap_mnesia_legacy / ldap_mnesia / 7b161b7 ldap_mnesia_latest / ldap_mnesia / 7b161b7 internal_mnesia_latest / internal_mnesia / 7b161b7 cluster_commands_SUITE:join_twice_using_rpc{error,
{{badrpc,timeout},
[{distributed_helper,rpc,
[#{timeout => 60000,node => mongooseim2@localhost},
mongoose_cluster,join,
[mongooseim@localhost]],
[{file,
"/home/circleci/project/big_tests/../test/common/distributed_helper.erl"},
{line,143}]},
{cluster_commands_SUITE,join_twice_using_rpc,1,
[{file,
"/home/circleci/project/big_tests/tests/cluster_commands_SUITE.erl"},
{line,296}]},
{test_server,ts_tc,3,[{file,"test_server.erl"},{line,1796}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1305}]},
{test_server,run_test_case_eval,9,
[{file,"test_server.erl"},{line,1237}]}]}}cluster_commands_SUITE:join_twice_in_parallel_using_rpc{error,{test_case_failed,wait_for_process_to_stop_timeout}}cluster_commands_SUITE:cluster_of_three{error,
{{assertEqual,
[{module,cluster_commands_SUITE},
{line,357},
{expression,"OpCode1"},
{expected,0},
{value,1}]},
[{cluster_commands_SUITE,cluster_of_three,1,
[{file,
"/home/circleci/project/big_tests/tests/cluster_commands_SUITE.erl"},
{line,357}]},
{test_server,ts_tc,3,[{file,"test_server.erl"},{line,1796}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1305}]},
{test_server,run_test_case_eval,9,
[{file,"test_server.erl"},{line,1237}]}]}}cluster_commands_SUITE:leave_the_three{error,
{{badrpc,timeout},
[{distributed_helper,rpc,
[#{timeout => 60000,node => mongooseim2@localhost},
mongoose_cluster,join,
[mongooseim@localhost]],
[{file,
"/home/circleci/project/big_tests/../test/common/distributed_helper.erl"},
{line,143}]},
{cluster_commands_SUITE,leave_the_three,1,
[{file,
"/home/circleci/project/big_tests/tests/cluster_commands_SUITE.erl"},
{line,369}]},
{test_server,ts_tc,3,[{file,"test_server.erl"},{line,1796}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1305}]},
{test_server,run_test_case_eval,9,
[{file,"test_server.erl"},{line,1237}]}]}}cluster_commands_SUITE:remove_dead_from_cluster{error,
{{badrpc,timeout},
[{distributed_helper,rpc,
[#{timeout => 60000,node => mongooseim2@localhost},
mongoose_cluster,join,
[mongooseim@localhost]],
[{file,
"/home/circleci/project/big_tests/../test/common/distributed_helper.erl"},
{line,143}]},
{cluster_commands_SUITE,remove_dead_from_cluster,1,
[{file,
"/home/circleci/project/big_tests/tests/cluster_commands_SUITE.erl"},
{line,388}]},
{test_server,ts_tc,3,[{file,"test_server.erl"},{line,1796}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1305}]},
{test_server,run_test_case_eval,9,
[{file,"test_server.erl"},{line,1237}]}]}}cluster_commands_SUITE:remove_alive_from_cluster{error,
{{badrpc,timeout},
[{distributed_helper,rpc,
[#{timeout => 60000,node => mongooseim2@localhost},
mongoose_cluster,join,
[mongooseim@localhost]],
[{file,
"/home/circleci/project/big_tests/../test/common/distributed_helper.erl"},
{line,143}]},
{cluster_commands_SUITE,remove_alive_from_cluster,1,
[{file,
"/home/circleci/project/big_tests/tests/cluster_commands_SUITE.erl"},
{line,411}]},
{test_server,ts_tc,3,[{file,"test_server.erl"},{line,1796}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1305}]},
{test_server,run_test_case_eval,9,
[{file,"test_server.erl"},{line,1237}]}]}}component_SUITE:init_per_suite{fail,[{validate_node_failed,mongooseim_not_running,mongooseim2@localhost}]}dynamic_domains_SUITE:init_per_suite{fail,[{validate_node_failed,mongooseim_not_running,mongooseim2@localhost}]}graphql_server_SUITE:init_per_suite{fail,[{validate_node_failed,mongooseim_not_running,mongooseim2@localhost}]}jingle_SUITE:init_per_suite{fail,[{validate_node_failed,mongooseim_not_running,mongooseim2@localhost}]}last_SUITE:init_per_suite{fail,[{validate_node_failed,mongooseim_not_running,mongooseim2@localhost}]}local_iq_SUITE:init_per_suite{fail,[{validate_node_failed,mongooseim_not_running,mongooseim2@localhost}]}mod_global_distrib_SUITE:init_per_suite{fail,[{validate_node_failed,mongooseim_not_running,mongooseim2@localhost}]}persistent_cluster_id_SUITE:init_per_suite{fail,[{validate_node_failed,mongooseim_not_running,mongooseim2@localhost}]}s2s_SUITE:init_per_suite{fail,[{validate_node_failed,mongooseim_not_running,mongooseim2@localhost}]}service_domain_db_SUITE:init_per_suite{fail,[{validate_node_failed,mongooseim_not_running,mongooseim2@localhost}]}service_mongoose_system_metrics_SUITE:init_per_suite{fail,[{validate_node_failed,mongooseim_not_running,mongooseim2@localhost}]}shutdown_SUITE:init_per_suite{fail,[{validate_node_failed,mongooseim_not_running,mongooseim2@localhost}]}system_probes_SUITE:init_per_suite{fail,[{validate_node_failed,mongooseim_not_running,mongooseim2@localhost}]}dynamic_domains_mysql_redis_latest / mysql_redis / 7b161b7 mam_SUITE:end_per_suite{error,{test_case_failed,"Instrumentation events that were logged, but not tested:\n[{async_pool_queue_lengths,#{host_type => <<\"test type\">>,\n pool_id => muc_mam}}]\nYou need to test them with instrument_helper:assert/3"}}dynamic_domains_pgsql_cets_latest / pgsql_mnesia / 7b161b7 mam_SUITE:end_per_suite{error,{test_case_failed,"Instrumentation events that were logged, but not tested:\n[{async_pool_queue_lengths,#{host_type => <<\"test type\">>,\n pool_id => muc_mam}}]\nYou need to test them with instrument_helper:assert/3"}}dynamic_domains_pgsql_mnesia_legacy / pgsql_mnesia / 7b161b7 mam_SUITE:end_per_suite{error,{test_case_failed,"Instrumentation events that were logged, but not tested:\n[{async_pool_queue_lengths,#{host_type => <<\"test type\">>,\n pool_id => muc_mam}}]\nYou need to test them with instrument_helper:assert/3"}}pgsql_cets_latest / pgsql_cets / 7b161b7 mam_SUITE:end_per_suite{error,{test_case_failed,"Instrumentation events that were logged, but not tested:\n[{async_pool_queue_lengths,#{host_type => <<\"localhost\">>,\n pool_id => muc_mam}}]\nYou need to test them with instrument_helper:assert/3"}}dynamic_domains_pgsql_mnesia_latest / pgsql_mnesia / 7b161b7 mam_SUITE:end_per_suite{error,{test_case_failed,"Instrumentation events that were logged, but not tested:\n[{async_pool_queue_lengths,#{host_type => <<\"test type\">>,\n pool_id => muc_mam}}]\nYou need to test them with instrument_helper:assert/3"}}mysql_redis_latest / mysql_redis / 7b161b7 mam_SUITE:end_per_suite{error,{test_case_failed,"Instrumentation events that were logged, but not tested:\n[{async_pool_queue_lengths,#{host_type => <<\"localhost\">>,\n pool_id => muc_mam}}]\nYou need to test them with instrument_helper:assert/3"}}pgsql_mnesia_legacy / pgsql_mnesia / 7b161b7 mam_SUITE:end_per_suite{error,{test_case_failed,"Instrumentation events that were logged, but not tested:\n[{async_pool_queue_lengths,#{host_type => <<\"localhost\">>,\n pool_id => muc_mam}}]\nYou need to test them with instrument_helper:assert/3"}}pgsql_mnesia_latest / pgsql_mnesia / 7b161b7 mam_SUITE:end_per_suite{error,{test_case_failed,"Instrumentation events that were logged, but not tested:\n[{async_pool_queue_lengths,#{host_type => <<\"localhost\">>,\n pool_id => muc_mam}}]\nYou need to test them with instrument_helper:assert/3"}}cockroachdb_cets_latest / cockroachdb_cets / 7b161b7 mam_SUITE:end_per_suite{error,{test_case_failed,"Instrumentation events that were logged, but not tested:\n[{async_pool_queue_lengths,#{host_type => <<\"localhost\">>,\n pool_id => muc_mam}}]\nYou need to test them with instrument_helper:assert/3"}} |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4695 +/- ##
==========================================
+ Coverage 85.77% 85.87% +0.09%
==========================================
Files 551 550 -1
Lines 33180 33167 -13
==========================================
+ Hits 28461 28482 +21
+ Misses 4719 4685 -34 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
e6a653a to
52bafb3
Compare
f8f4795 to
b44067e
Compare
chrzaszcz
left a comment
There was a problem hiding this comment.
Looks good 👍 - I added minor comments.
7e376ec to
7b161b7
Compare
That module was a leftover, it's been entirely rewritten and had a messy API. This PR fixes all these issues.