-
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
Fix slow MAM muc_prefs_cases tests #4286
Conversation
This has a huge impact on the testing times for these cases. Since the room is reused across `muc_run_prefs_case` calls, there is no need to resend presence every time - the users are room participants all the time. The issue is that when (re)entering, Alice would wait for 4 stanzas - 3 presences and 1 room subject message. However, only in the beginning, as a new user would she receive the room subject - subsequent waits for 4 stanzas failed silently after only 3 presences, but only after waiting the 5s timeout. This has happend 6 times per testcase, and there were 3 tescases using this mechanism, so there is 3*6*5=90s less pointless waiting now.
elasticsearch_and_cassandra_26 / elasticsearch_and_cassandra_mnesia / 41863b7 small_tests_25 / small_tests / 41863b7 small_tests_26 / small_tests / 41863b7 small_tests_26_arm64 / small_tests / 41863b7 ldap_mnesia_25 / ldap_mnesia / 41863b7 dynamic_domains_mysql_redis_26 / mysql_redis / 41863b7 ldap_mnesia_26 / ldap_mnesia / 41863b7 dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / 41863b7 dynamic_domains_pgsql_mnesia_26 / pgsql_mnesia / 41863b7 pgsql_cets_26 / pgsql_cets / 41863b7 dynamic_domains_mssql_mnesia_26 / odbc_mssql_mnesia / 41863b7 pgsql_mnesia_25 / pgsql_mnesia / 41863b7 internal_mnesia_26 / internal_mnesia / 41863b7 pgsql_mnesia_26 / pgsql_mnesia / 41863b7 mysql_redis_26 / mysql_redis / 41863b7 mssql_mnesia_26 / odbc_mssql_mnesia / 41863b7 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## feature/instrument #4286 +/- ##
======================================================
- Coverage 84.70% 84.67% -0.04%
======================================================
Files 556 556
Lines 33890 33890
======================================================
- Hits 28708 28697 -11
- Misses 5182 5193 +11 ☔ 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.
Looks good! Thanks for the fix!
This PR fixes three testcase added recently. I'm having issues with this case in my other PR, and noticed that it's surprisingly slow.
Time before fix:
Time after fix:
Explanation:
Since the room is reused across
muc_run_prefs_case
calls, there is no need to resend presence every time - the users are room participants all the time. The issue is that when (re)entering, Alice would wait for 4 stanzas - 3 presences and 1 room subject message. However, only in the beginning, as a new user would she receive the room subject - subsequent waits for 4 stanzas failed silently after only 3 presences, but only after waiting the 5s timeout. This has happend 6 times per testcase, and there were 3 tescases using this mechanism, so there is 3 * 6 * 5=90s less pointless waiting now.I think maybe Escalus should fail loudly when less then N stanzas arrive when waiting for N stanzas.