wp-rocket icon indicating copy to clipboard operation
wp-rocket copied to clipboard

Fix warning from integration test due to preload table (Thirdparty tests)

Open CrochetFeve0251 opened this issue 2 years ago • 3 comments

Description

Fix warning due to the cache table from the new preload functionality.

For that I added the table in the bootstrap and added it on every tests needing it. Note: I could fix warnings on the initial load from the bootstrap.php.

Type of change

  • [ ] Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • [ ] Automated Test

Checklist:

  • [ ] My code follows the style guidelines of this project
  • [ ] I have performed a self-review of my own code
  • [ ] I have commented my code, particularly in hard-to-understand areas
  • [ ] I have made corresponding changes to the documentation
  • [ ] My changes generate no new warnings
  • [ ] I have added tests that prove my fix is effective or that my feature works
  • [ ] New and existing unit tests pass locally with my changes
  • [ ] Any dependent changes have been merged and published in downstream modules

CrochetFeve0251 avatar Aug 31 '22 14:08 CrochetFeve0251

Looking at the tests run on GH there is still a lot if popping-up, it seems to happen even outside of the tests themselves?

remyperona avatar Aug 31 '22 15:08 remyperona

Looking at the tests run on GH there is still a lot if popping-up, it seems to happen even outside of the tests themselves?

@Tabrisrp Yes problem is this function _delete_all_posts called inside /tmp/wordpress-tests-lib/includes/bootstrap.php that call the cache clearing and so the preload.

CrochetFeve0251 avatar Sep 01 '22 06:09 CrochetFeve0251

@Tabrisrp look like guarding the table fix warnings outside the tests: https://github.com/wp-media/wp-rocket/runs/8074979289?check_suite_focus=true

CrochetFeve0251 avatar Sep 01 '22 06:09 CrochetFeve0251