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

E2E tests: Try fixing 'networkidle' timeout errors #51826

Merged
merged 2 commits into from
Jun 23, 2023

Conversation

noisysocks
Copy link
Member

@noisysocks noisysocks commented Jun 23, 2023

A lot of tests are timing out when they call page.waitForLoadState( 'networkidle' ). @talldan ran git bisect and worked out that it's to do with a recent Core commit that adjusted the Cache-Control headers set by WordPress. Removing no-store from the header seems to fix the issue.

I'm pretty stumped as to why this happens. (A Chrome bug?) This PR simply uses the nocache_headers filter to remove no-store from Cache-Control header in our E2E test environment. Hopefully this fixes the tests and unblocks committers from doing work while we investigate what's actually going on here.

Related Trac ticket: https://core.trac.wordpress.org/ticket/58592
Slack thread: https://wordpress.slack.com/archives/C02QB2JS7/p1687418950952019

@noisysocks noisysocks added [Type] Bug An existing feature does not function as intended [Priority] High Used to indicate top priority items that need quick attention [Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. labels Jun 23, 2023
Copy link
Contributor

@talldan talldan 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, at least as a temporary measure until we have more idea about what's happening!

@talldan talldan merged commit d978b0b into trunk Jun 23, 2023
@talldan talldan deleted the fix/e2e-networkidle-failures branch June 23, 2023 03:35
@github-actions github-actions bot added this to the Gutenberg 16.1 milestone Jun 23, 2023
noisysocks added a commit that referenced this pull request Jun 28, 2023
sethrubenstein pushed a commit to pewresearch/gutenberg that referenced this pull request Jul 13, 2023
* Remove 'no-store' from the Cache-Control header when running E2E tests

* Fix PHP lint errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Priority] High Used to indicate top priority items that need quick attention [Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants