-
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
Test domain removal in mod_cache_users #3302
Conversation
0e712d4
to
e4105bc
Compare
small_tests_24 / small_tests / 9d07d99 internal_mnesia_24 / internal_mnesia / 9d07d99 |
Codecov Report
@@ Coverage Diff @@
## master #3302 +/- ##
==========================================
+ Coverage 80.19% 80.20% +0.01%
==========================================
Files 398 398
Lines 32584 32584
==========================================
+ Hits 26130 26135 +5
+ Misses 6454 6449 -5
Continue to review full report at Codecov.
|
small_tests_24 / small_tests / 4cf3a70 internal_mnesia_24 / internal_mnesia / 4cf3a70 |
small_tests_24 / small_tests / 0e712d4 internal_mnesia_24 / internal_mnesia / 0e712d4 |
small_tests_24 / small_tests / e4105bc internal_mnesia_24 / internal_mnesia / e4105bc small_tests_23 / small_tests / e4105bc ldap_mnesia_24 / ldap_mnesia / e4105bc mod_event_pusher_rabbit_SUITE:group_chat_message_publish:group_chat_message_received_event_properly_formatted{error,
{{assertMatch,
[{module,mod_event_pusher_rabbit_SUITE},
{line,435},
{expression,
"get_decoded_message_from_rabbit ( AliceGroupChatMsgRecvRK )"},
{pattern,
"# { << \"from_user_id\" >> := BobRoomJID , << \"to_user_id\" >> := AliceFullJID , << \"message\" >> := Message }"},
{value,
#{<<"from_user_id">> =>
<<"[email protected]/bOb_unnamed_99.13712">>,
<<"message">> => <<"Hi there!">>,
<<"to_user_id">> =>
<<"alice_unnamed_99.310036@localhost/res1">>}}]},
[{mod_event_pusher_rabbit_SUITE,
'-group_chat_message_received_event_properly_formatted/1-fun-1-',3,
[{file,
"/home/circleci/app/big_tests/tests/mod_event_pusher_rabbit_SUITE.erl"},
{line,435}]},
{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}]}]}} ldap_mnesia_23 / ldap_mnesia / e4105bc dynamic_domains_24 / pgsql_mnesia / e4105bc dynamic_domains_23 / pgsql_mnesia / e4105bc pgsql_mnesia_24 / pgsql_mnesia / e4105bc domain_removal_SUITE:cache_removal:cache_removal{error,{{assertEqual,[{module,domain_removal_SUITE},
{line,133},
{expression,"does_cached_user_exist ( FreshConfig , alice_bis )"},
{expected,{stop,true}},
{value,false}]},
[{domain_removal_SUITE,cache_removal,1,
[{file,"/home/circleci/app/big_tests/tests/domain_removal_SUITE.erl"},
{line,133}]},
{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}]}]}} elasticsearch_and_cassandra_24 / elasticsearch_and_cassandra_mnesia / e4105bc pgsql_mnesia_23 / pgsql_mnesia / e4105bc domain_removal_SUITE:cache_removal:cache_removal{error,{{assertEqual,[{module,domain_removal_SUITE},
{line,133},
{expression,"does_cached_user_exist ( FreshConfig , alice_bis )"},
{expected,{stop,true}},
{value,false}]},
[{domain_removal_SUITE,'-cache_removal/1-fun-2-',1,
[{file,"/home/circleci/app/big_tests/tests/domain_removal_SUITE.erl"},
{line,133}]},
{domain_removal_SUITE,cache_removal,1,
[{file,"/home/circleci/app/big_tests/tests/domain_removal_SUITE.erl"},
{line,133}]},
{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 / e4105bc domain_removal_SUITE:cache_removal:cache_removal{error,{{assertEqual,[{module,domain_removal_SUITE},
{line,133},
{expression,"does_cached_user_exist ( FreshConfig , alice_bis )"},
{expected,{stop,true}},
{value,false}]},
[{domain_removal_SUITE,cache_removal,1,
[{file,"/home/circleci/app/big_tests/tests/domain_removal_SUITE.erl"},
{line,133}]},
{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 / e4105bc domain_removal_SUITE:cache_removal:cache_removal{error,{{assertEqual,[{module,domain_removal_SUITE},
{line,133},
{expression,"does_cached_user_exist ( FreshConfig , alice_bis )"},
{expected,{stop,true}},
{value,false}]},
[{domain_removal_SUITE,cache_removal,1,
[{file,"/home/circleci/app/big_tests/tests/domain_removal_SUITE.erl"},
{line,133}]},
{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}]}]}} riak_mnesia_24 / riak_mnesia / e4105bc |
e4105bc
to
03692d6
Compare
small_tests_24 / small_tests / 03692d6 internal_mnesia_24 / internal_mnesia / 03692d6 small_tests_23 / small_tests / 03692d6 dynamic_domains_24 / pgsql_mnesia / 03692d6 ldap_mnesia_24 / ldap_mnesia / 03692d6 ldap_mnesia_23 / ldap_mnesia / 03692d6 dynamic_domains_23 / pgsql_mnesia / 03692d6 pgsql_mnesia_24 / pgsql_mnesia / 03692d6 mod_event_pusher_rabbit_SUITE:group_chat_message_publish:group_chat_message_received_event_properly_formatted{error,
{{assertMatch,
[{module,mod_event_pusher_rabbit_SUITE},
{line,435},
{expression,
"get_decoded_message_from_rabbit ( AliceGroupChatMsgRecvRK )"},
{pattern,
"# { << \"from_user_id\" >> := BobRoomJID , << \"to_user_id\" >> := AliceFullJID , << \"message\" >> := Message }"},
{value,
#{<<"from_user_id">> =>
<<"[email protected]/bOb_unnamed_36.170314">>,
<<"message">> => <<"Hi there!">>,
<<"to_user_id">> =>
<<"alice_unnamed_36.398442@localhost/res1">>}}]},
[{mod_event_pusher_rabbit_SUITE,
'-group_chat_message_received_event_properly_formatted/1-fun-1-',3,
[{file,
"/home/circleci/app/big_tests/tests/mod_event_pusher_rabbit_SUITE.erl"},
{line,435}]},
{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}]}]}} domain_removal_SUITE:cache_removal:cache_removal{error,{{archive_size,1,
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0]},
[{mongoose_helper,do_wait_until,3,
[{file,"/home/circleci/app/big_tests/tests/mongoose_helper.erl"},
{line,353}]},
{escalus_story,story,4,
[{file,"/home/circleci/app/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
{line,72}]},
{domain_removal_SUITE,cache_removal,1,
[{file,"/home/circleci/app/big_tests/tests/domain_removal_SUITE.erl"},
{line,132}]},
{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 / 03692d6 domain_removal_SUITE:cache_removal:cache_removal{error,{{archive_size,1,
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0]},
[{mongoose_helper,do_wait_until,3,
[{file,"/home/circleci/app/big_tests/tests/mongoose_helper.erl"},
{line,353}]},
{escalus_story,story,4,
[{file,"/home/circleci/app/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
{line,72}]},
{domain_removal_SUITE,cache_removal,1,
[{file,"/home/circleci/app/big_tests/tests/domain_removal_SUITE.erl"},
{line,132}]},
{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}]}]}} elasticsearch_and_cassandra_24 / elasticsearch_and_cassandra_mnesia / 03692d6 mongoose_elasticsearch_SUITE:all:start_and_stop_sequence{error,
{{assertMatch,
[{module,mongoose_elasticsearch_SUITE},
{line,76},
{expression,
"rpc ( mim ( ) , mongoose_elasticsearch , health , [ ] )"},
{pattern,"{ ok , _ }"},
{value,{error,{'EXIT',no_workers}}}]},
[{mongoose_elasticsearch_SUITE,start_and_stop_sequence,1,
[{file,
"/home/circleci/app/big_tests/tests/mongoose_elasticsearch_SUITE.erl"},
{line,76}]},
{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_23 / pgsql_mnesia / 03692d6 domain_removal_SUITE:cache_removal:cache_removal{error,{{archive_size,1,
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0]},
[{mongoose_helper,do_wait_until,3,
[{file,"/home/circleci/app/big_tests/tests/mongoose_helper.erl"},
{line,353}]},
{escalus_story,story,4,
[{file,"/home/circleci/app/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
{line,72}]},
{domain_removal_SUITE,cache_removal,1,
[{file,"/home/circleci/app/big_tests/tests/domain_removal_SUITE.erl"},
{line,132}]},
{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 / 03692d6 domain_removal_SUITE:cache_removal:cache_removal{error,{{archive_size,1,
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0]},
[{mongoose_helper,do_wait_until,3,
[{file,"/home/circleci/app/big_tests/tests/mongoose_helper.erl"},
{line,353}]},
{escalus_story,story,4,
[{file,"/home/circleci/app/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
{line,72}]},
{domain_removal_SUITE,cache_removal,1,
[{file,"/home/circleci/app/big_tests/tests/domain_removal_SUITE.erl"},
{line,132}]},
{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}]}]}} riak_mnesia_24 / riak_mnesia / 03692d6 |
This is needed to make the test work with static and dynamic domains, which have different host type configurations: - One host type for dynamic domains - Two host types for static domains
small_tests_24 / small_tests / 31536fb internal_mnesia_24 / internal_mnesia / 31536fb amp_big_SUITE:offline:offline_success:drop_deliver_to_online_user_test{error,
{test_case_failed,
{has_stanzas_but_shouldnt,
{client,
<<"alicE_drop_deliver_to_online_user_test_69.766185@localhost/res1">>,
escalus_tcp,<0.4134.0>,
[{event_manager,<0.4027.0>},
{server,<<"localhost">>},
{username,
<<"alicE_drop_deliver_to_online_user_test_69.766185">>},
{resource,<<"res1">>}],
[{event_client,
[{event_manager,<0.4027.0>},
{server,<<"localhost">>},
{username,
<<"alicE_drop_deliver_to_online_user_test_69.766185">>},
{resource,<<"res1">>}]},
{resource,<<"res1">>},
{username,
<<"alicE_drop_deliver_to_online_user_test_69.766185">>},
{server,<<"localhost">>},
{host,<<"localhost">>},
{port,5222},
{auth,{escalus_auth,auth_plain}},
{wspath,undefined},
{username,
<<"alicE_drop_deliver_to_online_user_test_69.766185">>},
{server,<<"localhost">>},
{password,<<"matygrysa">>},
{stream_id,<<"c71f461df713f3cd">>}]},
[{xmlel,<<"stream:error">>,[],
[{xmlel,<<"conflict">>,
[{<<"xmlns">>,
<<"urn:ietf:params:xml:ns:xmpp-streams">>}],
[]},
{xmlel,<<"text">>,
[{<<"xml:lang">>,<<"en">>},
{<<"xmlns">>,
<<"urn:ietf:params:xml:ns:xmpp-streams">>}],
[{xmlcdata,<<"Replaced by new connection">>}]}]},
{xmlst... small_tests_23 / small_tests / 31536fb dynamic_domains_24 / pgsql_mnesia / 31536fb ldap_mnesia_24 / ldap_mnesia / 31536fb pgsql_mnesia_24 / pgsql_mnesia / 31536fb ldap_mnesia_23 / ldap_mnesia / 31536fb elasticsearch_and_cassandra_24 / elasticsearch_and_cassandra_mnesia / 31536fb mysql_redis_24 / mysql_redis / 31536fb mssql_mnesia_24 / odbc_mssql_mnesia / 31536fb carboncopy_SUITE:all:unavailable_resources_dont_get_carbons{error,{{assertion_failed,assert_many,false,[is_presence,is_presence],[],[]},
[{escalus_new_assert,assert_true,2,
[{file,"/home/circleci/app/big_tests/_build/default/lib/escalus/src/escalus_new_assert.erl"},
{line,84}]},
{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}]}]}} carboncopy_SUITE:all:prop_forward_sent_chat_messages{error,
{{assertEqual,
[{module,carboncopy_SUITE},
{line,278},
{expression,
"proper : quickcheck ( proper : conjunction ( [ { PropName , Property } ] ) , [ verbose , long_result , { numtests , 3 } ] )"},
{expected,true},
{value,
[[{forward_sent,
[{4,<<"Now, fair Hippolyta, our nuptial hour">>}]}]]}]},
[{carboncopy_SUITE,run_prop,2,
[{file,"/home/circleci/app/big_tests/tests/carboncopy_SUITE.erl"},
{line,278}]},
{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}]}]}} carboncopy_SUITE:all:prop_normal_routing_to_bare_jid{error,
{{assertEqual,
[{module,carboncopy_SUITE},
{line,278},
{expression,
"proper : quickcheck ( proper : conjunction ( [ { PropName , Property } ] ) , [ verbose , long_result , { numtests , 3 } ] )"},
{expected,true},
{value,
[[{normal_routing,
[{4,<<"Now, fair Hippolyta, our nuptial hour">>}]}]]}]},
[{carboncopy_SUITE,run_prop,2,
[{file,"/home/circleci/app/big_tests/tests/carboncopy_SUITE.erl"},
{line,278}]},
{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}]}]}} carboncopy_SUITE:all:prop_forward_received_chat_messages{error,
{{assertEqual,
[{module,carboncopy_SUITE},
{line,278},
{expression,
"proper : quickcheck ( proper : conjunction ( [ { PropName , Property } ] ) , [ verbose , long_result , { numtests , 3 } ] )"},
{expected,true},
{value,
[[{forward_received,
[{4,<<"Now, fair Hippolyta, our nuptial hour">>}]}]]}]},
[{carboncopy_SUITE,run_prop,2,
[{file,"/home/circleci/app/big_tests/tests/carboncopy_SUITE.erl"},
{line,278}]},
{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_23 / pgsql_mnesia / 31536fb dynamic_domains_23 / pgsql_mnesia / 31536fb riak_mnesia_24 / riak_mnesia / 31536fb internal_mnesia_24 / internal_mnesia / 31536fb |
This module caches the users for quicker MAM and Inbox operations. It implements
remove_domain
, but a test was missing.The test calls an API function for host types of two different domains, which have different host type configurations in different test specs:
dynamic_domains.spec
default.spec
This required determining the host type dynamically, so a helper function was added with this functionality.
Note: we might want to eventually redesign the test suite to always use dynamic domains, because it is counter-intuitive to test domain removal hooks for static domains, which are never removed. This might require adding more users to
default.spec
anddynamic_domain.spec
. Alternatively, we might just enabledynamic_domains
for more DB backends (we should do that anyway) and simply remove this test suite fromdefault.spec
.