#60831 closed defect (bug) (fixed)
Investigate flakey `Tests_Admin_wpSiteHealth ::test_object_cache_thresholds()` test
| Reported by: | swissspidy | Owned by: | peterwilsoncc |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.9.1 |
| Component: | Site Health | Version: | |
| Severity: | normal | Keywords: | has-patch has-unit-tests |
| Cc: | Focuses: |
Description
The following two tests / datasets sometimes fail for certain hosting providers:
Tests_Admin_wpSiteHealth::test_object_cache_thresholds::test_object_cache_thresholds with data set #2
Tests_Admin_wpSiteHealth::test_object_cache_thresholds with data set #2 ('terms_count', 1)
Failed asserting that false is true.
/tmp/wp-test-runner/tests/phpunit/tests/admin/wpSiteHealth.php:482
Tests_Admin_wpSiteHealth::test_object_cache_thresholds::test_object_cache_thresholds with data set #3
Tests_Admin_wpSiteHealth::test_object_cache_thresholds with data set #3 ('options_count', 100)
Failed asserting that false is true.
/tmp/wp-test-runner/tests/phpunit/tests/admin/wpSiteHealth.php:482
Example: https://make.wordpress.org/hosting/test-results/r57871/digitoimistodude-r57871/
Maybe these are just issues with that particular host, but perhaps there's also a opportunity to make the tests more robust. So let's try to look into it to find out more.
Change History (10)
This ticket was mentioned in Slack in #core by jorbin. View the logs.
9 months ago
This ticket was mentioned in PR #10813 on WordPress/wordpress-develop by @peterwilsoncc.
9 months ago
#3
- Keywords has-patch has-unit-tests added
Reduces the thresholds for all options tests to be very low in order to substantially reduce the change the WordPress environment will affect the test.
Trac ticket: https://core.trac.wordpress.org/ticket/60831
This ticket was mentioned in PR #10814 on WordPress/wordpress-develop by @peterwilsoncc.
9 months ago
#4
Reduces the thresholds for all options tests to be very low in order to substantially reduce the change the WordPress environment will affect the test.
Includes the change committed earlier to the build tools for the options count for backporting to 6.9.
Trac ticket: https://core.trac.wordpress.org/ticket/60831
#5
@
9 months ago
I've created a pull request to reduce the targets right down to almost nothing so the threasholds are much more likely to be passed, regardless of the environment.
PR#10813 targets trunk and reduces the alloptions count to 1 and the alloptions byte count to 10.
PR#10814 targets the 6.9 branch and does the same with the inclusion of the change made to the options count in r61438.
I've not been able to reproduce the issue locally so unable to do a bisect to find the improvement that triggered the test threashold to be above the default config for the test suite.
This ticket was mentioned in Slack in #core by peterwilsoncc. View the logs.
9 months ago
#10
@
9 months ago
@swissspidy I've committed changes to reduce the thresholds to ridiculously low numbers to ensure the tests pass.
I backported to the 6.9 branch as the test suite was consistently failing on some MariaDB 5.5 instances, creating much noise in Slack.
I'll keep an eye on things to see if we need to backport further but it appears to be a recent change causing the flakiness.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
I noticed that this issue is no longer occurring on trunk, I think it's related to the data provider value being changed from 100 to 1.
https://github.com/WordPress/wordpress-develop/pull/10638/changes/0b4a0ae4d97b4645c5840b3fcdbe7016f3ab4a5e