-
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
Do not update module config #3389
Conversation
This comment has been minimized.
This comment has been minimized.
Codecov Report
@@ Coverage Diff @@
## master #3389 +/- ##
==========================================
+ Coverage 77.85% 80.71% +2.85%
==========================================
Files 397 397
Lines 32240 32199 -41
==========================================
+ Hits 25102 25990 +888
+ Misses 7138 6209 -929
Continue to review full report at Codecov.
|
This comment has been minimized.
This comment has been minimized.
Use the API to save, ensure and restore config instead.
6427284
to
06bafee
Compare
This comment has been minimized.
This comment has been minimized.
f948c99
to
223ec1f
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
223ec1f
to
64c71fc
Compare
This comment has been minimized.
This comment has been minimized.
07efd46
to
4513b20
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
4513b20
to
7bc61ff
Compare
This comment has been minimized.
This comment has been minimized.
Use the API to save, ensure and restore config instead.
7bc61ff
to
fdbe62f
Compare
small_tests_24 / small_tests / fdbe62f internal_mnesia_24 / internal_mnesia / fdbe62f small_tests_23 / small_tests / fdbe62f dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / fdbe62f sm_SUITE:parallel_manual_ack_freq_1:resume_session_state_send_message{error,
{{assertion_failed,assert_many,true,
[#Fun<sm_SUITE.22.129580571>,#Fun<sm_SUITE.22.129580571>,
#Fun<sm_SUITE.22.129580571>],
[{xmlel,<<"presence">>,
[{<<"from">>,
<<"alicE_resume_session_state_send_message_75.808587@domain.example.com/escalus-default-resource">>},
{<<"to">>,
<<"alice_resume_session_state_send_message_75.808587@domain.example.com/escalus-default-resource">>},
{<<"xml:lang">>,<<"en">>}],
[]},
{xmlel,<<"message">>,
[{<<"from">>,
<<"bOb_resume_session_state_send_message_75.738695@domain.example.com/escalus-default-resource">>},
{<<"to">>,
<<"alicE_resume_session_state_send_message_75.808587@domain.example.com">>},
{<<"xml:lang">>,<<"en">>},
{<<"type">>,<<"chat">>}],
[{xmlel,<<"body">>,[],[{xmlcdata,<<"msg-1">>}]},
{xmlel,<<"delay">>,
[{<<"xmlns">>,<<"urn:xmpp:delay">>},
{<<"stamp">>,<<"2021-11-09T11:21:15.874870Z">>},
{<<"from">>,<<"domain.example.com">>}],
[{xmlcdata,<<"SM Storage">>}]}]},
{xmlel,<<"message">>,
[{<<"from">>,
<<"bOb_resume_session_state_send_message_75.738695@domain.example.com/escalus-default-resource">>},
{<<"to">>,
<<"alicE_resume_session_state_send_message_75.808587@domain.example.com">>},
{<<"xml:lang">>,<<"en">>},
{<<"type">>,<<"chat">>}],
[{xmlel,<<"body">>,[],[{xmlcdata,<<"msg-2">>}]},
... ldap_mnesia_24 / ldap_mnesia / fdbe62f dynamic_domains_pgsql_mnesia_23 / pgsql_mnesia / fdbe62f ldap_mnesia_23 / ldap_mnesia / fdbe62f dynamic_domains_mysql_redis_24 / mysql_redis / fdbe62f dynamic_domains_mssql_mnesia_24 / odbc_mssql_mnesia / fdbe62f pgsql_mnesia_24 / pgsql_mnesia / fdbe62f elasticsearch_and_cassandra_24 / elasticsearch_and_cassandra_mnesia / fdbe62f sm_SUITE:parallel_manual_ack_freq_1:resume_session_state_send_message{error,
{{assertion_failed,assert_many,true,
[#Fun<sm_SUITE.22.129580571>,#Fun<sm_SUITE.22.129580571>,
#Fun<sm_SUITE.22.129580571>],
[{xmlel,<<"presence">>,
[{<<"from">>,
<<"alicE_resume_session_state_send_message_71.579356@localhost/escalus-default-resource">>},
{<<"to">>,
<<"alice_resume_session_state_send_message_71.579356@localhost/escalus-default-resource">>},
{<<"xml:lang">>,<<"en">>}],
[]},
{xmlel,<<"message">>,
[{<<"from">>,
<<"bOb_resume_session_state_send_message_71.538355@localhost/escalus-default-resource">>},
{<<"to">>,
<<"alicE_resume_session_state_send_message_71.579356@localhost">>},
{<<"xml:lang">>,<<"en">>},
{<<"type">>,<<"chat">>}],
[{xmlel,<<"body">>,[],[{xmlcdata,<<"msg-1">>}]},
{xmlel,<<"delay">>,
[{<<"xmlns">>,<<"urn:xmpp:delay">>},
{<<"stamp">>,<<"2021-11-09T11:26:11.621159Z">>},
{<<"from">>,<<"localhost">>}],
[{xmlcdata,<<"SM Storage">>}]}]},
{xmlel,<<"message">>,
[{<<"from">>,
<<"bOb_resume_session_state_send_message_71.538355@localhost/escalus-default-resource">>},
{<<"to">>,
<<"alicE_resume_session_state_send_message_71.579356@localhost">>},
{<<"xml:lang">>,<<"en">>},
{<<"type">>,<<"chat">>}],
[{xmlel,<<"body">>,[],[{xmlcdata,<<"msg-2">>}]},
{xmlel,<<"delay">>,
[{<<"xmlns">>,<<"urn:xm... pgsql_mnesia_23 / pgsql_mnesia / fdbe62f mssql_mnesia_24 / odbc_mssql_mnesia / fdbe62f jingle_SUITE:all:resp_4xx_from_sip_proxy_results_in_session_terminate{error,
{{assertion_failed,assert,is_iq_result,
{xmlel,<<"iq">>,
[{<<"from">>,<<"error.480@localhost">>},
{<<"to">>,
<<"alice_resp_4xx_from_sip_proxy_results_in_session_terminate_5.803059@localhost/res1">>},
{<<"id">>,<<"abfe48c5-8b35-4d4d-897d-bb56209d31f3">>},
{<<"type">>,<<"set">>}],
[{xmlel,<<"jingle">>,
[{<<"xmlns">>,<<"urn:xmpp:jingle:1">>},
{<<"action">>,<<"session-terminate">>},
{<<"sid">>,<<"2fbe8eab-e6c2-4cc3-9521-1406bf5c2e50">>}],
[{xmlel,<<"reason">>,[],
[{xmlel,<<"general-error">>,[],[]},
{xmlel,<<"sip-error">>,
[{<<"code">>,<<"480">>}],
[{xmlcdata,<<"Temporarily Unavailable">>}]}]}]}]},
"<iq from='error.480@localhost' to='alice_resp_4xx_from_sip_proxy_results_in_session_terminate_5.803059@localhost/res1' id='abfe48c5-8b35-4d4d-897d-bb56209d31f3' type='set'><jingle xmlns='urn:xmpp:jingle:1' action='session-terminate' sid='2fbe8eab-e6c2-4cc3-9521-1406bf5c2e50'><reason><general-error/><sip-error code='480'>Temporarily Unavailable</sip-error></reason></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,
'-resp_... pep_SUITE:pep_tests:unsubscribe_after_presence_unsubscription{error,
{{badmatch,
[{xmlel,<<"message">>,
[{<<"from">>,
<<"alice_unsubscribe_after_presence_unsubscription_71.963835@localhost">>},
{<<"to">>,
<<"bob_unsubscribe_after_presence_unsubscription_71.963835@localhost/res1">>},
{<<"type">>,<<"headline">>}],
[{xmlel,<<"event">>,
[{<<"xmlns">>,
<<"http://jabber.org/protocol/pubsub#event">>}],
[{xmlel,<<"items">>,
[{<<"node">>,<<"zwDSrIZF6ul+hZb7u5NxWg==">>}],
[{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/app/big_tests/tests/pep_SUITE.erl"},
{line,384}]},
{escalus_story,story,4,
[{file,
"/home/circleci/app/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}]}]}} mysql_redis_24 / mysql_redis / fdbe62f riak_mnesia_24 / riak_mnesia / fdbe62f mod_ping_SUITE:server_ping:server_ping_pong{error,{{badmatch,[{[<<"localhost">>,mod_ping,ping_response],
{expected_diff,5},
{before_story,0},
{after_story,4}}]},
[{escalus_mongooseim,post_story_check_metrics,1,
[{file,"/home/circleci/app/big_tests/_build/default/lib/escalus/src/escalus_mongooseim.erl"},
{line,74}]},
{escalus_mongooseim,maybe_check_metrics_post_story,1,
[{file,"/home/circleci/app/big_tests/_build/default/lib/escalus/src/escalus_mongooseim.erl"},
{line,51}]},
{escalus_story,story,4,
[{file,"/home/circleci/app/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
{line,75}]},
{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}]}]}} sm_SUITE:parallel_manual_ack_freq_1:resume_session_state_send_message{error,
{{assertion_failed,assert_many,true,
[#Fun<sm_SUITE.22.129580571>,#Fun<sm_SUITE.22.129580571>,
#Fun<sm_SUITE.22.129580571>],
[{xmlel,<<"presence">>,
[{<<"from">>,
<<"alicE_resume_session_state_send_message_3.132757@localhost/escalus-default-resource">>},
{<<"to">>,
<<"alice_resume_session_state_send_message_3.132757@localhost/escalus-default-resource">>},
{<<"xml:lang">>,<<"en">>}],
[]},
{xmlel,<<"message">>,
[{<<"from">>,
<<"bOb_resume_session_state_send_message_2.969518@localhost/escalus-default-resource">>},
{<<"to">>,
<<"alicE_resume_session_state_send_message_3.132757@localhost">>},
{<<"xml:lang">>,<<"en">>},
{<<"type">>,<<"chat">>}],
[{xmlel,<<"body">>,[],[{xmlcdata,<<"msg-1">>}]},
{xmlel,<<"delay">>,
[{<<"xmlns">>,<<"urn:xmpp:delay">>},
{<<"stamp">>,<<"2021-11-09T11:31:43.377493Z">>},
{<<"from">>,<<"localhost">>}],
[{xmlcdata,<<"SM Storage">>}]}]},
{xmlel,<<"message">>,
[{<<"from">>,
<<"bOb_resume_session_state_send_message_2.969518@localhost/escalus-default-resource">>},
{<<"to">>,
<<"alicE_resume_session_state_send_message_3.132757@localhost">>},
{<<"xml:lang">>,<<"en">>},
{<<"type">>,<<"chat">>}],
[{xmlel,<<"body">>,[],[{xmlcdata,<<"msg-2">>}]},
{xmlel,<<"delay">>,
[{<<"xmlns">>,<<"urn:xmpp:del... |
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.
Neat, and I particularly like how stream_management, both source code and test suite, have changed here 😄
%% copy-n-paste from gen_mod.erl | ||
-record(ejabberd_module, {module_host, opts}). |
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.
Oh man, yes, having this copied here was such a haaaaack 😅
end_per_testcase(CaseName, Config) -> | ||
escalus:end_per_testcase(CaseName, Config). | ||
|
||
%% Module configuration per group | ||
|
||
required_modules(GroupName) -> |
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.
ideal
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.
good
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.
Really cool, nice to see some "don't use outside of tests" functions removed (mod_stream_management
is sooo much nicer now).
small_tests_24 / small_tests / fcb0141 internal_mnesia_24 / internal_mnesia / fcb0141 small_tests_23 / small_tests / fcb0141 dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / fcb0141 ldap_mnesia_24 / ldap_mnesia / fcb0141 dynamic_domains_mysql_redis_24 / mysql_redis / fcb0141 dynamic_domains_pgsql_mnesia_23 / pgsql_mnesia / fcb0141 dynamic_domains_mssql_mnesia_24 / odbc_mssql_mnesia / fcb0141 sm_SUITE:parallel_manual_ack_freq_1:resume_session_state_send_message{error,
{{assertion_failed,assert_many,true,
[#Fun<sm_SUITE.22.129580571>,#Fun<sm_SUITE.22.129580571>,
#Fun<sm_SUITE.22.129580571>],
[{xmlel,<<"presence">>,
[{<<"from">>,
<<"alicE_resume_session_state_send_message_60.186915@domain.example.com/escalus-default-resource">>},
{<<"to">>,
<<"alice_resume_session_state_send_message_60.186915@domain.example.com/escalus-default-resource">>},
{<<"xml:lang">>,<<"en">>}],
[]},
{xmlel,<<"message">>,
[{<<"from">>,
<<"bOb_resume_session_state_send_message_60.102568@domain.example.com/escalus-default-resource">>},
{<<"to">>,
<<"alicE_resume_session_state_send_message_60.186915@domain.example.com">>},
{<<"xml:lang">>,<<"en">>},
{<<"type">>,<<"chat">>}],
[{xmlel,<<"body">>,[],[{xmlcdata,<<"msg-1">>}]},
{xmlel,<<"delay">>,
[{<<"xmlns">>,<<"urn:xmpp:delay">>},
{<<"stamp">>,<<"2021-11-09T13:02:40.282024Z">>},
{<<"from">>,<<"domain.example.com">>}],
[{xmlcdata,<<"SM Storage">>}]}]},
{xmlel,<<"message">>,
[{<<"from">>,
<<"bOb_resume_session_state_send_message_60.102568@domain.example.com/escalus-default-resource">>},
{<<"to">>,
<<"alicE_resume_session_state_send_message_60.186915@domain.example.com">>},
{<<"xml:lang">>,<<"en">>},
{<<"type">>,<<"chat">>}],
[{xmlel,<<"body">>,[],[{xmlcdata,<<"msg-2">>}]},
... ldap_mnesia_23 / ldap_mnesia / fcb0141 elasticsearch_and_cassandra_24 / elasticsearch_and_cassandra_mnesia / fcb0141 mysql_redis_24 / mysql_redis / fcb0141 pgsql_mnesia_23 / pgsql_mnesia / fcb0141 sm_SUITE:parallel:messages_are_properly_flushed_during_resumption{error,
{{badmatch,
{error,
{connection_step_failed,
{#Fun<sm_SUITE.11.121793717>,
{client,
<<"alicE_messages_are_properly_flushed_during_resumption_42.239260@localhost">>,
escalus_tcp,<0.8735.2>,undefined,
[{username,
<<"alicE_messages_are_properly_flushed_during_resumption_42.239260">>},
{server,<<"localhost">>},
{password,<<"matygrysa">>},
{stream_management,true},
{host,<<"localhost">>},
{stream_id,<<"c87827d621a95251">>}]},
[{compression,[<<"zlib">>]},
{starttls,true},
{stream_management,true},
{advanced_message_processing,true},
{client_state_indication,false},
{sasl_mechanisms,[<<"SCRAM-SHA-256">>,<<"PLAIN">>]},
{caps,undefined}]},
{timeout,get_resumed}}}},
[{sm_SUITE,'-messages_are_properly_flushed_during_resumption/1-fun-1-',
3,
[{file,"/home/circleci/app/big_tests/tests/sm_SUITE.erl"},
{line,1226}]},
{escalus_story,story,4,
[{file,
"/home/circleci/app/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
{line,72}]},
{test_server,ts_tc,3,[{file,"test_server.erl"},{line,1784}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1293}]},
{test_server,run_test_case_eval,9,
[{file,"test_server.erl"},{line,1225}]}]}} mssql_mnesia_24 / odbc_mssql_mnesia / fcb0141 carboncopy_SUITE:end_per_suite{error,
{{unregistering_failed,
{amount,6},
{unregistered_items,
[{{<<"_prop_forward_received_chat_messages_10.940553">>,
[{escalus_event_mgr,<0.11470.0>},
{tc_name,prop_forward_received_chat_messages},
{escalus_cleaner,<0.11469.0>},
{watchdog,<0.11468.0>},
{mim_data_dir,
"/home/circleci/app/big_tests/tests/carboncopy_SUITE_data"},
{preset,"odbc_mssql_mnesia"},
{tc_logfile,
"https://circleci-mim-results.s3.eu-central-1.amazonaws.com/PR/3389/85703/odbc_mssql_mnesia.24.0-1/big/ct_run.test%40default-fa0529ed-ab9f-4ff5-b14e-bee6dbd08722.2021-11-09_12.50.49/big_tests.tests.carboncopy_SUITE.logs/run.2021-11-09_12.51.49/carboncopy_suite.prop_forward_received_chat_messages.3235.html"},
{tc_group_properties,
[{suite,carboncopy_SUITE},
{name,all},
{repeat_until_all_ok,3},
parallel]},
{tc_group_path,[]},
{data_dir,
"/home/circleci/app/big_tests/_build/default/lib/mongoose_tests/ebin/carboncopy_SUITE_data/"},
{priv_dir,
"https://circleci-mim-results.s3.eu-central-1.amazonaws.com/PR/3389/85703/odbc_mssql_mnesia.24.0-1/big/ct_run.test%40default-fa0529ed-ab9f-4ff5-b14e-bee6dbd08722.2021-11-09_12.50.49/big_tests.tests.carboncopy_SUITE.logs/run.2021-11-09_12.51.49/log_private/"},
{escalus_users,
[{alice,
[{username,
<<"alicE_prop_forward_received_chat_messages_10.940553">>},
{server,<<"localhost">>},
{password,<<"matygrysa">>}]},
{bob,
[{username,<<"bOb_prop_forward_received_chat_messages_10.940553">>},
{server,<<"localhost">>},
{password,<<"makrolika">>}]}]}]},
... mongooseimctl_SUITE:stats:stats_global{error,{{badmatch,{"12\n",0}},
[{mongooseimctl_SUITE,'-stats_global/1-fun-0-',3,
[{file,"/home/circleci/app/big_tests/tests/mongooseimctl_SUITE.erl"},
{line,1057}]},
{escalus_story,story,4,
[{file,"/home/circleci/app/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_24 / pgsql_mnesia / fcb0141 riak_mnesia_24 / riak_mnesia / fcb0141 |
This PR removes all calls to
gen_mod:set_module_opt
from modules, making the module config constant.Key changes:
dynamic_modules
in a more structured way, avoiding nested saving and restoring at multiple levels (suite, group, testcase) whenever possible.Not done in this PR:
set_module_opt
andset_module_opts
from big tests, mostlymam_SUITE
. This should be done separately as it is a bigger task.