-
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
Refactored hook handlers in mod_amp module #3815
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
Codecov ReportBase: 83.03% // Head: 83.03% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## master #3815 +/- ##
=======================================
Coverage 83.03% 83.03%
=======================================
Files 529 529
Lines 33886 33886
=======================================
Hits 28138 28138
Misses 5748 5748 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. |
e0e061b
to
2b41fb5
Compare
small_tests_24 / small_tests / 2b41fb5 small_tests_25 / small_tests / 2b41fb5 dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 2b41fb5 ldap_mnesia_24 / ldap_mnesia / 2b41fb5 ldap_mnesia_25 / ldap_mnesia / 2b41fb5 dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / 2b41fb5 dynamic_domains_mysql_redis_25 / mysql_redis / 2b41fb5 dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / 2b41fb5 internal_mnesia_25 / internal_mnesia / 2b41fb5 elasticsearch_and_cassandra_25 / elasticsearch_and_cassandra_mnesia / 2b41fb5 pgsql_mnesia_24 / pgsql_mnesia / 2b41fb5 pgsql_mnesia_25 / pgsql_mnesia / 2b41fb5 mam_SUITE:rdbms_async_pool_disabled_complex_queries:init_per_group{'EXIT',
{{badrpc,
{'EXIT',
{{start_child_failed,
{error,
{{shutdown,
{failed_to_start_child,pm_mam_async_pool_localhost,
{shutdown,
{failed_to_start_child,
'wpool_pool-pm_mam_async_pool_localhost-process-sup',
{shutdown,
{failed_to_start_child,
'wpool_pool-pm_mam_async_pool_localhost-10',
{already_started,<9158.5699.2>}}}}}}},
{child,undefined,pm_mam_sup_async_pool_localhost,
{mongoose_async_pools,start_link,
[<<"localhost">>,pm_mam,
#{batch_name => insert_mam_messages30,batch_size => 30,
enabled => true,
flush_callback => fun mod_mam_rdbms_arch_async:flush/2,
flush_extra =>
#{batch_name => insert_mam_messages30,batch_size => 30,
enabled => true,flush_interval => 1,pool_size => 16},
flush_interval => 1,pool_size => 16,pool_type => batch}]},
transient,false,infinity,supervisor,
[mongoose_async_pools]}}},
#{id => pm_mam_sup_async_pool_localhost,restart => transient,
start =>
{mongoose_async_pools,start_link,
[<<"localhost">>,pm_mam,
#{batch_name => insert_mam_messages30,batch_size => 30,
enabled => true,
flush_callback => fun mod_mam_rdbms_arch_async:flush/2,
flush_extra =>
#{batch_name => insert_mam_messages30,batch_size => 30,
enabled => true,flush_interval => 1,pool_size => 16},
flush_interval => 1,pool_size => 16,pool_type => batch}]},
type => supervisor}},
... 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}]}]}} riak_mnesia_24 / riak_mnesia / 2b41fb5 graphql_server_SUITE:admin_http:clustering_http_tests:remove_dead_from_cluster_http{error,
{{badrpc,
{'EXIT',
{#{cluster_member => mongooseim@localhost,
reason => set_extra_db_nodes_failed,
result => {ok,[]}},
[{mongoose_cluster,set_extra_db_nodes,1,
[{file,"/home/circleci/project/src/mongoose_cluster.erl"},
{line,132}]},
{mongoose_cluster,unsafe_join,2,
[{file,"/home/circleci/project/src/mongoose_cluster.erl"},
{line,116}]},
{mongoose_cluster,with_app_stopped,2,
[{file,"/home/circleci/project/src/mongoose_cluster.erl"},
{line,221}]},
{global,trans,4,[{file,"global.erl"},{line,463}]},
{mongoose_cluster,join,1,[]}]}}},
[{distributed_helper,rpc,
[#{node => mongooseim3@localhost,timeout => 60000},
mongoose_cluster,join,
[mongooseim@localhost]],
[{file,
"/home/circleci/project/big_tests/tests/distributed_helper.erl"},
{line,121}]},
{graphql_server_SUITE,remove_dead_from_cluster_http,1,
[{file,
"/home/circleci/project/big_tests/tests/graphql_server_SUITE.erl"},
{line,247}]},
{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}]}]}} mysql_redis_25 / mysql_redis / 2b41fb5 mssql_mnesia_25 / odbc_mssql_mnesia / 2b41fb5 small_tests_24 / small_tests / 2b41fb5 small_tests_25 / small_tests / 2b41fb5 pgsql_mnesia_25 / pgsql_mnesia / 2b41fb5 riak_mnesia_24 / riak_mnesia / 2b41fb5 |
2b41fb5
to
6ded200
Compare
small_tests_24 / small_tests / 6ded200 small_tests_25 / small_tests / 6ded200 dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 6ded200 ldap_mnesia_24 / ldap_mnesia / 6ded200 ldap_mnesia_25 / ldap_mnesia / 6ded200 dynamic_domains_mysql_redis_25 / mysql_redis / 6ded200 dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / 6ded200 dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / 6ded200 internal_mnesia_25 / internal_mnesia / 6ded200 pgsql_mnesia_24 / pgsql_mnesia / 6ded200 elasticsearch_and_cassandra_25 / elasticsearch_and_cassandra_mnesia / 6ded200 pgsql_mnesia_25 / pgsql_mnesia / 6ded200 mysql_redis_25 / mysql_redis / 6ded200 riak_mnesia_24 / riak_mnesia / 6ded200 mssql_mnesia_25 / odbc_mssql_mnesia / 6ded200 |
6ded200
to
0912341
Compare
small_tests_24 / small_tests / 0912341 small_tests_25 / small_tests / 0912341 dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 0912341 ldap_mnesia_24 / ldap_mnesia / 0912341 ldap_mnesia_25 / ldap_mnesia / 0912341 dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / 0912341 dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / 0912341 dynamic_domains_mysql_redis_25 / mysql_redis / 0912341 elasticsearch_and_cassandra_25 / elasticsearch_and_cassandra_mnesia / 0912341 pgsql_mnesia_24 / pgsql_mnesia / 0912341 internal_mnesia_25 / internal_mnesia / 0912341 pgsql_mnesia_25 / pgsql_mnesia / 0912341 riak_mnesia_24 / riak_mnesia / 0912341 mysql_redis_25 / mysql_redis / 0912341 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}]}]}} mssql_mnesia_25 / odbc_mssql_mnesia / 0912341 mysql_redis_25 / mysql_redis / 0912341 |
0912341
to
80916f8
Compare
small_tests_24 / small_tests / 80916f8 small_tests_25 / small_tests / 80916f8 ldap_mnesia_24 / ldap_mnesia / 80916f8 dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 80916f8 ldap_mnesia_25 / ldap_mnesia / 80916f8 dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / 80916f8 internal_mnesia_25 / internal_mnesia / 80916f8 elasticsearch_and_cassandra_25 / elasticsearch_and_cassandra_mnesia / 80916f8 dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / 80916f8 pgsql_mnesia_24 / pgsql_mnesia / 80916f8 pgsql_mnesia_25 / pgsql_mnesia / 80916f8 mysql_redis_25 / mysql_redis / 80916f8 riak_mnesia_24 / riak_mnesia / 80916f8 mssql_mnesia_25 / odbc_mssql_mnesia / 80916f8 inbox_extensions_SUITE:async_pools:one_to_one:mute_muted_entry_gets_unmuted{error,
{{assert,
[{module,inbox_extensions_SUITE},
{line,798},
{expression,"escalus_pred : is_message ( Message )"},
{expected,true},
{value,false}]},
[{inbox_extensions_SUITE,check_message_with_properties,4,
[{file,
"/home/circleci/project/big_tests/tests/inbox_extensions_SUITE.erl"},
{line,798}]},
{inbox_extensions_SUITE,set_inbox_properties,4,
[{file,
"/home/circleci/project/big_tests/tests/inbox_extensions_SUITE.erl"},
{line,792}]},
{inbox_extensions_SUITE,'-mute_muted_entry_gets_unmuted/1-fun-2-',2,
[{file,
"/home/circleci/project/big_tests/tests/inbox_extensions_SUITE.erl"},
{line,568}]},
{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}]}]}} pep_SUITE:pep_tests:delayed_receive{error,{{badmatch,[]},
[{pep_SUITE,'-delayed_receive/1-fun-0-',3,
[{file,"/home/circleci/project/big_tests/tests/pep_SUITE.erl"},
{line,276}]},
{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}]}]}} pep_SUITE:pep_tests:send_caps_after_login_test{error,
{timeout_when_waiting_for_stanza,
[{escalus_client,wait_for_stanza,
[{client,
<<"alice_send_caps_after_login_test_2550@localhost/res1">>,
escalus_tcp,<0.18076.2>,
[{event_manager,<0.18024.2>},
{server,<<"localhost">>},
{username,<<"alicE_send_caps_after_login_test_2550">>},
{resource,<<"res1">>}],
[{event_client,
[{event_manager,<0.18024.2>},
{server,<<"localhost">>},
{username,<<"alicE_send_caps_after_login_test_2550">>},
{resource,<<"res1">>}]},
{resource,<<"res1">>},
{username,<<"alice_send_caps_after_login_test_2550">>},
{server,<<"localhost">>},
{host,<<"localhost">>},
{port,5222},
{auth,{escalus_auth,auth_plain}},
{wspath,undefined},
{username,<<"alicE_send_caps_after_login_test_2550">>},
{server,<<"localhost">>},
{password,<<"matygrysa">>},
{stream_id,<<"d4995d50d31c453c">>}]},
5000],
[{file,
"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_client.erl"},
{line,136}]},
{pubsub_tools,receive_response,3,
[{file,"/home/circleci/project/big_tests/tests/pubsub_tools.erl"},
{line,480}]},
{pubsub_tools,receive_and_check_response,4,
[{file,"/home/circleci/project/big_tests/tests/pubsub_tools.erl"},
{line,471}]},
{pep_S... pep_SUITE:pep_tests:authorize_access_model{error,
{timeout_when_waiting_for_stanza,
[{escalus_client,wait_for_stanza,
[{client,<<"alice_authorize_access_model_2556@localhost/res1">>,
escalus_tcp,<0.18093.2>,
[{event_manager,<0.18066.2>},
{server,<<"localhost">>},
{username,<<"alicE_authorize_access_model_2556">>},
{resource,<<"res1">>}],
[{event_client,
[{event_manager,<0.18066.2>},
{server,<<"localhost">>},
{username,<<"alicE_authorize_access_model_2556">>},
{resource,<<"res1">>}]},
{resource,<<"res1">>},
{username,<<"alice_authorize_access_model_2556">>},
{server,<<"localhost">>},
{host,<<"localhost">>},
{port,5222},
{auth,{escalus_auth,auth_plain}},
{wspath,undefined},
{username,<<"alicE_authorize_access_model_2556">>},
{server,<<"localhost">>},
{password,<<"matygrysa">>},
{stream_id,<<"dd75a4f143d17c70">>}]},
5000],
[{file,
"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_client.erl"},
{line,136}]},
{pubsub_tools,receive_response,3,
[{file,"/home/circleci/project/big_tests/tests/pubsub_tools.erl"},
{line,480}]},
{pubsub_tools,receive_and_check_response,4,
[{file,"/home/circleci/project/big_tests/tests/pubsub_tools.erl"},
{line,471}]},
{pep_SUITE,'-authorize_access_model/1... pep_SUITE:pep_tests:publish_and_notify_test{error,{{assertion_failed,assert_many,false,[is_roster_set,is_presence],[],[]},
[{escalus_new_assert,assert_true,2,
[{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_new_assert.erl"},
{line,84}]},
{escalus_story,'-make_all_clients_friends/1-fun-0-',2,
[{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
{line,111}]},
{escalus_utils,'-each_with_index/3-fun-0-',3,
[{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_utils.erl"},
{line,87}]},
{lists,foldl_1,3,[{file,"lists.erl"},{line,1355}]},
{escalus_utils,'-each_with_index/3-fun-0-',3,
[{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_utils.erl"},
{line,87}]},
{lists,foldl,3,[{file,"lists.erl"},{line,1350}]},
{escalus_utils,distinct_pairs,2,
[{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_utils.erl"},
{line,60}]},
{escalus_story,make_all_clients_friends,1,
[{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
{line,106}]}]}} pep_SUITE:pep_tests:h_ok_after_notify_test{error,{{assertion_failed,assert_many,false,
[is_roster_set,is_presence,is_presence],
[],[]},
[{escalus_new_assert,assert_true,2,
[{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_new_assert.erl"},
{line,84}]},
{escalus_story,'-make_all_clients_friends/1-fun-0-',2,
[{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
{line,114}]},
{escalus_utils,'-each_with_index/3-fun-0-',3,
[{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_utils.erl"},
{line,87}]},
{lists,foldl_1,3,[{file,"lists.erl"},{line,1355}]},
{escalus_utils,'-each_with_index/3-fun-0-',3,
[{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_utils.erl"},
{line,87}]},
{lists,foldl,3,[{file,"lists.erl"},{line,1350}]},
{escalus_utils,distinct_pairs,2,
[{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_utils.erl"},
{line,60}]},
{escalus_story,make_all_clients_friends,1,
[{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
{line,106}]}]}} pep_SUITE:pep_tests:unsubscribe_after_presence_unsubscription{error,{{assertion_failed,assert_many,false,[is_roster_set],[],[]},
[{escalus_new_assert,assert_true,2,
[{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_new_assert.erl"},
{line,84}]},
{escalus_story,'-make_all_clients_friends/1-fun-0-',2,
[{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
{line,117}]},
{escalus_utils,'-each_with_index/3-fun-0-',3,
[{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_utils.erl"},
{line,87}]},
{lists,foldl_1,3,[{file,"lists.erl"},{line,1355}]},
{escalus_utils,'-each_with_index/3-fun-0-',3,
[{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_utils.erl"},
{line,87}]},
{lists,foldl,3,[{file,"lists.erl"},{line,1350}]},
{escalus_utils,distinct_pairs,2,
[{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_utils.erl"},
{line,60}]},
{escalus_story,make_all_clients_friends,1,
[{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
{line,106}]}]}} mssql_mnesia_25 / odbc_mssql_mnesia / 80916f8 |
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.
Pretty straightforward, only one minor comment, can merge if you want 🙂
src/amp_strategy.erl
Outdated
'match-resource' = MatchResource, | ||
'expire-at' = undefined}. | ||
'expire-at' = undefined}}. |
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.
Update indentation after the previous line got longer :)
80916f8
to
badbe55
Compare
small_tests_24 / small_tests / badbe55 small_tests_25 / small_tests / badbe55 ldap_mnesia_24 / ldap_mnesia / badbe55 dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / badbe55 dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / badbe55 ldap_mnesia_25 / ldap_mnesia / badbe55 dynamic_domains_mysql_redis_25 / mysql_redis / badbe55 internal_mnesia_25 / internal_mnesia / badbe55 pgsql_mnesia_24 / pgsql_mnesia / badbe55 dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / badbe55 elasticsearch_and_cassandra_25 / elasticsearch_and_cassandra_mnesia / badbe55 pgsql_mnesia_25 / pgsql_mnesia / badbe55 mysql_redis_25 / mysql_redis / badbe55 mssql_mnesia_25 / odbc_mssql_mnesia / badbe55 inbox_extensions_SUITE:async_pools:one_to_one:mute_muted_entry_gets_unmuted{error,
{{assert,
[{module,inbox_extensions_SUITE},
{line,798},
{expression,"escalus_pred : is_message ( Message )"},
{expected,true},
{value,false}]},
[{inbox_extensions_SUITE,check_message_with_properties,4,
[{file,
"/home/circleci/project/big_tests/tests/inbox_extensions_SUITE.erl"},
{line,798}]},
{inbox_extensions_SUITE,set_inbox_properties,4,
[{file,
"/home/circleci/project/big_tests/tests/inbox_extensions_SUITE.erl"},
{line,792}]},
{inbox_extensions_SUITE,'-mute_muted_entry_gets_unmuted/1-fun-2-',2,
[{file,
"/home/circleci/project/big_tests/tests/inbox_extensions_SUITE.erl"},
{line,568}]},
{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 / badbe55 |
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.
LGTM 👌🏽
This PR changes all hook handlers in
mod_amp
module togen_hook
format.