Skip to content
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

Add new helper function to enable cets/mnesia in big_tests #4155

Merged
merged 1 commit into from
Nov 7, 2023

Conversation

pawlooss1
Copy link
Member

@pawlooss1 pawlooss1 commented Oct 31, 2023

This PR addresses MIM-2081.
It introduces new helper function ct_helper:get_internal_database/0 and replaces calls ct_helper:get_preset_var(Config, keystore_backend, mnesia)} with it. New function does not depend on test config but on configuration of MIM nodes under tests. Former approach was not developer friendly, i.e. it didn't work while:

  • Using the --rerun-big-tests option of test-runner.sh
  • Using make quicktest
  • Running them directly from the test shell with make console

Also, I fixed existing ct_helper:get_preset_var/3 implementation - 2nd clause of case instruction could never match, so instead of returning Default it raised an bad_arg error during list_to_existing_atom/1 call.

@mongoose-im
Copy link
Collaborator

mongoose-im commented Oct 31, 2023

elasticsearch_and_cassandra_26 / elasticsearch_and_cassandra_mnesia / 67bb910
Reports root/ big
OK: 369 / Failed: 0 / User-skipped: 38 / Auto-skipped: 0


small_tests_25 / small_tests / 67bb910
Reports root / small


small_tests_26 / small_tests / 67bb910
Reports root / small


small_tests_26_arm64 / small_tests / 67bb910
Reports root / small


ldap_mnesia_25 / ldap_mnesia / 67bb910
Reports root/ big
OK: 2307 / Failed: 0 / User-skipped: 865 / Auto-skipped: 0


ldap_mnesia_26 / ldap_mnesia / 67bb910
Reports root/ big
OK: 2307 / Failed: 0 / User-skipped: 865 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / 67bb910
Reports root/ big
OK: 4272 / Failed: 0 / User-skipped: 112 / Auto-skipped: 0


dynamic_domains_mysql_redis_26 / mysql_redis / 67bb910
Reports root/ big
OK: 4240 / Failed: 0 / User-skipped: 144 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_26 / pgsql_mnesia / 67bb910
Reports root/ big
OK: 4272 / Failed: 0 / User-skipped: 112 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_26 / odbc_mssql_mnesia / 67bb910
Reports root/ big
OK: 4269 / Failed: 0 / User-skipped: 115 / Auto-skipped: 0


internal_mnesia_26 / internal_mnesia / 67bb910
Reports root/ big
OK: 2456 / Failed: 1 / User-skipped: 715 / Auto-skipped: 0

s2s_SUITE:node1_tls_optional_node2_tls_required:simple_message
{error,
  {timeout_when_waiting_for_stanza,
    [{escalus_client,wait_for_stanza,
       [{client,<<"alice_simple_message_2001@fed1/res1">>,escalus_tcp,
          <0.57580.0>,
          [{event_manager,<0.57576.0>},
           {server,<<"fed1">>},
           {username,<<"alice_simple_message_2001">>},
           {resource,<<"res1">>}],
          [{event_client,
             [{event_manager,<0.57576.0>},
            {server,<<"fed1">>},
            {username,<<"alice_simple_message_2001">>},
            {resource,<<"res1">>}]},
           {resource,<<"res1">>},
           {username,<<"alice_simple_message_2001">>},
           {server,<<"fed1">>},
           {host,<<"localhost">>},
           {port,5242},
           {auth,{escalus_auth,auth_plain}},
           {wspath,undefined},
           {username,<<"alice_simple_message_2001">>},
           {server,<<"fed1">>},
           {host,<<"localhost">>},
           {port,5242},
           {password,<<"makota2">>},
           {stream_id,<<"d754bd6424b5f47f">>}]},
        10000],
       [{file,
          "/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_client.erl"},
        {line,136}]},
     {s2s_SUITE,'-simple_message/1-fun-0-',2,
       [{file,"/home/circleci/project/big_tests/tests/s2s_SUITE.erl"},
        {line,138}]},
     {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,[{f...

Report log


pgsql_mnesia_25 / pgsql_mnesia / 67bb910
Reports root/ big
OK: 4661 / Failed: 0 / User-skipped: 119 / Auto-skipped: 0


pgsql_mnesia_26 / pgsql_mnesia / 67bb910
Reports root/ big
OK: 4661 / Failed: 0 / User-skipped: 119 / Auto-skipped: 0


mysql_redis_26 / mysql_redis / 67bb910
Reports root/ big
OK: 4641 / Failed: 0 / User-skipped: 139 / Auto-skipped: 0


mssql_mnesia_26 / odbc_mssql_mnesia / 67bb910
Reports root/ big
OK: 4658 / Failed: 0 / User-skipped: 122 / Auto-skipped: 0


internal_mnesia_26 / internal_mnesia / 67bb910
Reports root/ big
OK: 2457 / Failed: 0 / User-skipped: 715 / Auto-skipped: 0

Copy link

codecov bot commented Oct 31, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (f989a92) 84.04% compared to head (ae21542) 84.04%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4155   +/-   ##
=======================================
  Coverage   84.04%   84.04%           
=======================================
  Files         564      564           
  Lines       34050    34050           
=======================================
+ Hits        28618    28619    +1     
+ Misses       5432     5431    -1     

see 11 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mongoose-im
Copy link
Collaborator

mongoose-im commented Nov 2, 2023

elasticsearch_and_cassandra_26 / elasticsearch_and_cassandra_mnesia / ae21542
Reports root/ big
OK: 369 / Failed: 0 / User-skipped: 38 / Auto-skipped: 0


small_tests_25 / small_tests / ae21542
Reports root / small


small_tests_26_arm64 / small_tests / ae21542
Reports root / small


small_tests_26 / small_tests / ae21542
Reports root / small


dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / ae21542
Reports root/ big
OK: 4272 / Failed: 0 / User-skipped: 112 / Auto-skipped: 0


ldap_mnesia_25 / ldap_mnesia / ae21542
Reports root/ big
OK: 2307 / Failed: 0 / User-skipped: 865 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_26 / pgsql_mnesia / ae21542
Reports root/ big
OK: 4272 / Failed: 0 / User-skipped: 112 / Auto-skipped: 0


ldap_mnesia_26 / ldap_mnesia / ae21542
Reports root/ big
OK: 2307 / Failed: 0 / User-skipped: 865 / Auto-skipped: 0


dynamic_domains_mysql_redis_26 / mysql_redis / ae21542
Reports root/ big
OK: 4240 / Failed: 0 / User-skipped: 144 / Auto-skipped: 0


internal_mnesia_26 / internal_mnesia / ae21542
Reports root/ big
OK: 2457 / Failed: 0 / User-skipped: 715 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_26 / odbc_mssql_mnesia / ae21542
Reports root/ big
OK: 4269 / Failed: 0 / User-skipped: 115 / Auto-skipped: 0


pgsql_mnesia_25 / pgsql_mnesia / ae21542
Reports root/ big
OK: 4661 / Failed: 0 / User-skipped: 119 / Auto-skipped: 0


pgsql_cets_26 / pgsql_cets / ae21542
Reports root/ big
OK: 4659 / Failed: 0 / User-skipped: 121 / Auto-skipped: 0


mysql_redis_26 / mysql_redis / ae21542
Reports root/ big
OK: 4641 / Failed: 0 / User-skipped: 139 / Auto-skipped: 0


mssql_mnesia_26 / odbc_mssql_mnesia / ae21542
Reports root/ big
OK: 4658 / Failed: 0 / User-skipped: 122 / Auto-skipped: 0


pgsql_mnesia_26 / pgsql_mnesia / ae21542
Reports root/ big
OK: 4661 / Failed: 0 / User-skipped: 119 / Auto-skipped: 0

@pawlooss1 pawlooss1 marked this pull request as ready for review November 2, 2023 13:43
@pawlooss1 pawlooss1 changed the title Add new helper function to enable cets/mnesia Add new helper function to enable cets/mnesia in big_tests Nov 2, 2023
Copy link
Member

@chrzaszcz chrzaszcz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I added a minor comment.

@@ -246,9 +246,6 @@
{component_backend, "\"cets\""},
{s2s_backend, "\"cets\""},
{stream_management_backend, cets},
{muc_online_backend, cets},
Copy link
Member

@chrzaszcz chrzaszcz Nov 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a few more options to clean up here, and they are unused. This can be done separately.

@chrzaszcz chrzaszcz merged commit f2c1fb1 into master Nov 7, 2023
4 checks passed
@chrzaszcz chrzaszcz deleted the fix-rerun-tests branch November 7, 2023 17:50
@chrzaszcz chrzaszcz added this to the 6.2.0 milestone Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants