-
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
Run test-runner setup steps in parallel #4100
Conversation
Speeds things up, because by default it blocks for 30 seconds doing nothing
New tools/parallel.sh script Sets up databases and build big_tests/releases in parallel
elasticsearch_and_cassandra_25 / elasticsearch_and_cassandra_mnesia / 212a65c small_tests_24 / small_tests / 212a65c small_tests_25_arm64 / small_tests / 212a65c small_tests_25 / small_tests / 212a65c ldap_mnesia_24 / ldap_mnesia / 212a65c ldap_mnesia_25 / ldap_mnesia / 212a65c dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 212a65c dynamic_domains_mysql_redis_25 / mysql_redis / 212a65c dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / 212a65c internal_mnesia_25 / internal_mnesia / 212a65c pgsql_cets_25 / pgsql_cets / 212a65c mysql_redis_25 / mysql_redis / 212a65c pgsql_mnesia_24 / pgsql_mnesia / 212a65c dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / 212a65c muc_SUITE:register:user_submits_registration_form{error,
{{assertion_failed,assert,is_iq_result,
[{xmlel,<<"iq">>,
[{<<"type">>,<<"set">>},
{<<"id">>,<<"ad87a8d8c7dc399af1ced11d261b61c0">>},
{<<"to">>,<<"groupchats.domain.example.com">>}],
[{xmlel,<<"query">>,
[{<<"xmlns">>,<<"jabber:iq:register">>}],
[{xmlel,<<"x">>,
[{<<"xmlns">>,<<"jabber:x:data">>},
{<<"type">>,<<"submit">>}],
[{xmlel,<<"field">>,
[{<<"type">>,<<"hidden">>},
{<<"var">>,<<"FORM_TYPE">>}],
[{xmlel,<<"value">>,[],
[{xmlcdata,<<"jabber:iq:register">>}]}]},
{xmlel,<<"field">>,
[{<<"type">>,<<"text-single">>},
{<<"var">>,<<"nick">>}],
[{xmlel,<<"value">>,[],
[{xmlcdata,
<<"thirdwitchroom-c6ba027b94">>}]}]}]}]}]}],
{xmlel,<<"iq">>,
[{<<"from">>,<<"groupchats.domain.example.com">>},
{<<"to">>,
<<"[email protected]/res1">>},
{<<"type">>,<<"error">>},
{<<"id">>,<<"ad87a8d8c7dc399af1ced11d261b61c0">>}],
[{xmlel,<<"query">>,
[{<<"xmlns">>,<<"jabber:iq:register">>}],
[{xmlel,<<"x">>,
[{<<"xmlns">>,<<"jabber:x:data">>},
{<<"type">>,<<"submit">>}],
[{xmlel,<<"field">>,
[{<<"type">>,<<"hidden">>},
{<<"var">>,<<"FORM_TYPE">>}],
... pgsql_mnesia_25 / pgsql_mnesia / 212a65c mssql_mnesia_25 / odbc_mssql_mnesia / 212a65c muc_light_http_api_SUITE:end_per_suite{error,
{{unregistering_failed,
{amount,1},
{unregistered_items,
[{{<<"_send_message_to_room_2645">>,
[{escalus_event_mgr,<0.5467.2>},
{tc_name,send_message_to_room},
{escalus_cleaner,<0.5466.2>},
{watchdog,<0.5465.2>},
{preset,"odbc_mssql_mnesia"},
{mim_data_dir,
"/home/circleci/project/big_tests/tests/muc_light_http_api_SUITE_data"},
{tc_logfile,
"https://circleci-mim-results.s3.eu-central-1.amazonaws.com/PR/4100/187478/odbc_mssql_mnesia.25.3-amd64/big/ct_run.test%40ac0164c322b0.2023-08-14_12.26.48/big_tests.tests.muc_light_http_api_SUITE.logs/run.2023-08-14_12.41.01/muc_light_http_api_suite.send_message_to_room.212866.html"},
{tc_group_properties,[{name,positive},parallel]},
{tc_group_path,[]},
{data_dir,
"/home/circleci/project/big_tests/_build/default/lib/mongoose_tests/ebin/muc_light_http_api_SUITE_data/"},
{priv_dir,
"https://circleci-mim-results.s3.eu-central-1.amazonaws.com/PR/4100/187478/odbc_mssql_mnesia.25.3-amd64/big/ct_run.test%40ac0164c322b0.2023-08-14_12.26.48/big_tests.tests.muc_light_http_api_SUITE.logs/run.2023-08-14_12.41.01/log_private/"},
{{saved_modules,mongooseim@localhost,<<"localhost">>},
#{mod_adhoc => #{iqdisc => one_queue,report_commands_node => false},
mod_amp => #{},
mod_bosh =>
#{backend => mnesia,inactivity => 30,max_pause => 120,
max_wait => infinity,server_acks => false},
mod_cache_users =>
#{number_of_segments => 5,strategy => fifo,time_to_live => 2},
mod_carboncopy => #{iqdisc => no_queue},
mod_disco =>
#{extra_domains => [],iq... dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / 212a65c |
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## master #4100 +/- ##
==========================================
+ Coverage 83.85% 83.87% +0.01%
==========================================
Files 551 551
Lines 33558 33558
==========================================
+ Hits 28141 28146 +5
+ Misses 5417 5412 -5 ☔ View full report in Codecov by Sentry. |
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.
This is all shell magic, wish we could have all these things in a more sane scripting language, but anyway, it works and it is very useful 🔥
This PR addresses "Faster local tests" MIM-2004.
Proposed changes include:
Rewrite wait_for_healthcheck script - now we run healthcheck command, instead of waiting for docker to run it. Saves 30 seconds for each DB start.
Run tasks in parallel in setup_db and test_runner.
Introduce tools/parallel.sh script.
It does not improve setup time on CircleCI, only locally.
The parallel tasks output would have a prefix (similar how docker-compose outputs):
Of course, you can disable this optimization to use the old behaviour (for debugging, for example):
# --no-parallel flag example: ./tools/test-runner.sh --skip-small-tests --db redis pgsql --preset internal_mnesia --skip-cover mod_global_distrib --no-parallel