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

Test instrumentation for dropped MAM messages #4253

Merged
merged 2 commits into from
Apr 2, 2024

Conversation

jacekwegr
Copy link
Contributor

@jacekwegr jacekwegr commented Mar 27, 2024

This PR adds tests for mod_mam_pm_dropped and mod_mam_muc_dropped events to verify that they occur after a message fails to be saved to the database. It also extends logging to regular writers, rather than only logging such events for async writers.

@mongoose-im

This comment was marked as outdated.

Copy link

codecov bot commented Mar 27, 2024

Codecov Report

Attention: Patch coverage is 64.28571% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 84.29%. Comparing base (2bd8689) to head (b72bd47).

Files Patch % Lines
src/mam/mod_mam_rdbms_arch.erl 0.00% 2 Missing ⚠️
src/mam/mod_mam_cassandra_arch.erl 75.00% 1 Missing ⚠️
src/mam/mod_mam_muc_cassandra_arch.erl 75.00% 1 Missing ⚠️
src/mam/mod_mam_muc_rdbms_arch.erl 50.00% 1 Missing ⚠️
Additional details and impacted files
@@                  Coverage Diff                   @@
##           feature/instrument    #4253      +/-   ##
======================================================
- Coverage               84.40%   84.29%   -0.12%     
======================================================
  Files                     556      556              
  Lines                   33695    33703       +8     
======================================================
- Hits                    28441    28410      -31     
- Misses                   5254     5293      +39     

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

@mongoose-im

This comment was marked as outdated.

@jacekwegr jacekwegr force-pushed the tests-for-dropped-mam-messages branch from 578ad1e to 338546f Compare March 28, 2024 15:00
@mongoose-im

This comment was marked as outdated.

@jacekwegr jacekwegr force-pushed the tests-for-dropped-mam-messages branch from 338546f to 7b2de84 Compare March 28, 2024 15:18
@mongoose-im

This comment was marked as outdated.

@jacekwegr jacekwegr force-pushed the tests-for-dropped-mam-messages branch from 7b2de84 to 0a46514 Compare March 29, 2024 09:10
@mongoose-im

This comment was marked as outdated.

@jacekwegr jacekwegr force-pushed the tests-for-dropped-mam-messages branch from 0a46514 to b72bd47 Compare March 29, 2024 09:42
@mongoose-im
Copy link
Collaborator

mongoose-im commented Mar 29, 2024

elasticsearch_and_cassandra_26 / elasticsearch_and_cassandra_mnesia / b72bd47
Reports root/ big
OK: 439 / Failed: 0 / User-skipped: 41 / Auto-skipped: 0


small_tests_25 / small_tests / b72bd47
Reports root / small


small_tests_26 / small_tests / b72bd47
Reports root / small


small_tests_26_arm64 / small_tests / b72bd47
Reports root / small


ldap_mnesia_25 / ldap_mnesia / b72bd47
Reports root/ big
OK: 2275 / Failed: 0 / User-skipped: 895 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_26 / pgsql_mnesia / b72bd47
Reports root/ big
OK: 4536 / Failed: 0 / User-skipped: 105 / Auto-skipped: 0


ldap_mnesia_26 / ldap_mnesia / b72bd47
Reports root/ big
OK: 2275 / Failed: 0 / User-skipped: 895 / Auto-skipped: 0


dynamic_domains_mysql_redis_26 / mysql_redis / b72bd47
Reports root/ big
OK: 4503 / Failed: 0 / User-skipped: 138 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / b72bd47
Reports root/ big
OK: 4536 / Failed: 0 / User-skipped: 105 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_26 / odbc_mssql_mnesia / b72bd47
Reports root/ big
OK: 4532 / Failed: 1 / User-skipped: 108 / Auto-skipped: 0

graphql_muc_light_SUITE:domain_admin:domain_admin_muc_light:admin_create_room_with_unprepped_id
{error,
  {{badmatch,null},
   [{graphql_muc_light_SUITE,admin_create_room_with_unprepped_id,1,
      [{file,
         "/home/circleci/project/big_tests/tests/graphql_muc_light_SUITE.erl"},
       {line,1155}]},
    {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1793}]},
    {test_server,run_test_case_eval1,6,
      [{file,"test_server.erl"},{line,1302}]},
    {test_server,run_test_case_eval,9,
      [{file,"test_server.erl"},{line,1234}]}]}}

Report log


pgsql_cets_26 / pgsql_cets / b72bd47
Reports root/ big
OK: 4449 / Failed: 0 / User-skipped: 174 / Auto-skipped: 0


internal_mnesia_26 / internal_mnesia / b72bd47
Reports root/ big
OK: 2415 / Failed: 0 / User-skipped: 755 / Auto-skipped: 0


pgsql_mnesia_26 / pgsql_mnesia / b72bd47
Reports root/ big
OK: 4925 / Failed: 0 / User-skipped: 112 / Auto-skipped: 0


pgsql_mnesia_25 / pgsql_mnesia / b72bd47
Reports root/ big
OK: 4925 / Failed: 0 / User-skipped: 112 / Auto-skipped: 0


mysql_redis_26 / mysql_redis / b72bd47
Reports root/ big
OK: 4904 / Failed: 0 / User-skipped: 133 / Auto-skipped: 0


mssql_mnesia_26 / odbc_mssql_mnesia / b72bd47
Reports root/ big
OK: 4922 / Failed: 0 / User-skipped: 115 / Auto-skipped: 0


small_tests_25 / small_tests / b72bd47
Reports root / small


dynamic_domains_mssql_mnesia_26 / odbc_mssql_mnesia / b72bd47
Reports root/ big
OK: 4531 / Failed: 2 / User-skipped: 108 / Auto-skipped: 0

graphql_muc_light_SUITE:admin_cli:admin_muc_light:admin_create_room_with_unprepped_id
{error,
  {#{what => invalid_response_code,expected_type => ok,
     response_code => {exit_status,1}},
   [{graphql_helper,assert_response_code,2,
      [{file,"/home/circleci/project/big_tests/tests/graphql_helper.erl"},
       {line,256}]},
    {graphql_helper,get_ok_value,2,
      [{file,"/home/circleci/project/big_tests/tests/graphql_helper.erl"},
       {line,239}]},
    {graphql_muc_light_SUITE,admin_create_room_with_unprepped_id,1,
      [{file,
         "/home/circleci/project/big_tests/tests/graphql_muc_light_SUITE.erl"},
       {line,1156}]},
    {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1793}]},
    {test_server,run_test_case_eval1,6,
      [{file,"test_server.erl"},{line,1302}]},
    {test_server,run_test_case_eval,9,
      [{file,"test_server.erl"},{line,1234}]}]}}

Report log

graphql_muc_light_SUITE:domain_admin:domain_admin_muc_light:admin_create_room_with_unprepped_id
{error,
  {{badmatch,null},
   [{graphql_muc_light_SUITE,admin_create_room_with_unprepped_id,1,
      [{file,
         "/home/circleci/project/big_tests/tests/graphql_muc_light_SUITE.erl"},
       {line,1155}]},
    {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1793}]},
    {test_server,run_test_case_eval1,6,
      [{file,"test_server.erl"},{line,1302}]},
    {test_server,run_test_case_eval,9,
      [{file,"test_server.erl"},{line,1234}]}]}}

Report log


dynamic_domains_mssql_mnesia_26 / odbc_mssql_mnesia / b72bd47
Reports root/ big
OK: 4533 / Failed: 0 / User-skipped: 108 / Auto-skipped: 0

@jacekwegr jacekwegr marked this pull request as ready for review March 29, 2024 10:56
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 to me. We could put Params in measurements just like for the *_archive_message events, but it's not necessary, because the tests are not parallel.

@chrzaszcz chrzaszcz merged commit a629f02 into feature/instrument Apr 2, 2024
3 of 4 checks passed
@chrzaszcz chrzaszcz deleted the tests-for-dropped-mam-messages branch April 2, 2024 13:27
@jacekwegr jacekwegr added this to the 6.3.0 milestone Oct 3, 2024
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.

3 participants