-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
tests(devtools): ensure WebSQL table is populated #13579
Conversation
await TestRunner.RuntimeAgent.invoke_evaluate({ | ||
expression: 'webSqlPromise', | ||
awaitPromise: true, | ||
}); |
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.
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.
ooooh, I see what you've done. You made the DB get initiated before LH even runs. To make that more clear can you move this to right after the navigate?
So how was this ever working before? :)
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.
So how was this ever working before?
It was flaky, sometimes the row would be added to the table in time, and sometimes it wouldn't. In CI it usually got added in time so I just kinda ignored the problem when it showed up locally.
Toplevel await works in module scripts, but the script itself is loaded asynchronously so there still isn't a guarantee that the row is added to the table before the page loads. I'm not sure if toplevel await is supported like you have it.
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.
To make that more clear can you move this to right after the navigate?
Move what to the right? Sorry don't understand.
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.
Not "to the right". "right after" TestRunner.navigatePromise
.
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.
🙃 🙃 🙃 🙃 🙃 🙃 🙃 🙃 🙃 🙃 🙃 🙃 🙃 🙃 🙃 🙃 🙃 🙃 🙃 🙃 🙃 🙃 🙃 🙃 🙃 🙃 🙃 🙃 🙃 🙃 🙃 🙃 🙃 🙃 🙃 🙃 🙃 🙃 🙃 🙃 🙃 🙃
Should prevent the flakiness in DevTools tests.