Skip to content

Tests: Solve a frequent race condition in tests in Chrome/Safari #1916

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

Merged
merged 1 commit into from
May 16, 2020

Conversation

mgol
Copy link
Member

@mgol mgol commented May 13, 2020

Give browsers some time to load the image if cache is disabled.
This resolves a frequent issue in Chrome/Safari.

@mgol mgol requested review from fnagel and arschmitz May 13, 2020 07:56
Copy link
Member

@dmethvin dmethvin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't wanna know how you found this one.

Copy link
Member

@fnagel fnagel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 by reading

@mgol mgol merged commit 579bedd into jquery:master May 16, 2020
@mgol mgol deleted the race-condition branch May 16, 2020 06:28
@mgol
Copy link
Member Author

mgol commented May 18, 2020

I don't wanna know how you found this one.

Don't you? ;) I saw that the test was only failing every other run locally so I had a look at what it does. When it was failing, it was reporting 0 dimensions. Since this was an image and the test was synchronous, I thought the image may not be ready yet so I tried with cache on in various configurations and it was passing there. And, bingo!

@mgol mgol added this to the 1.13 milestone Jun 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants