-
Notifications
You must be signed in to change notification settings - Fork 681
Fix flaky tests #10743
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
Fix flaky tests #10743
Conversation
09960eb to
9d3e45f
Compare
tests/acceptance/support-test.js
Outdated
| assert.strictEqual(currentURL(), '/crates/nanomsg'); | ||
| assert.dom('[data-test-id="crate-sidebar"]').exists(); |
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.
how would this fix 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.
Ah, wait, sorry. I should have used waitFor rather than assert.dom 🤦.
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.
I just changed it to wait for the button to exist.
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.
I should have used
waitForrather thanassert.dom🤦.
I guess that should work, though I'm wondering why it is needed here. iirc the link-crate-report button should be rendered directly and there are no network requests or other async things that would prevent that. feels like something else might be wrong.
ultimately, the assertion architecture of playwright where waitFor() is the default is probably better than the test waiter architecture of Ember.js 😅
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.
irc the
link-crate-reportbutton should be rendered directly and there are no network requests or other async things that would prevent that. . feels like something else might be wrong.
Yeah, I have no clue what's going on here either! It only depends on the crate (@crate.name), which should be resolved in the routes, but it's failing somehow for no obvious reason. This led me to wait for it explicitly as a naive solution. I should investigate the root cause in more detail in the future.
ultimately, the assertion architecture of playwright where
waitFor()is the default is probably better than the test waiter architecture of Ember.js 😅
Indeed, the auto-retry is much more ergonomic.
9d3e45f to
3776296
Compare
3776296 to
0781d80
Compare
Turbo87
left a comment
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.
I guess we can merge this for now until we find a better solution (or migrate the whole codebase to use waitFor() instead :P)
https://github.com/rust-lang/crates.io/actions/runs/13762342974/job/38481079622?pr=10794 |
I'm not sure what the issue is here. It would be great if we could take a screenshot when it fails to find the DOM. |
Attempting to fix the following flaky tests:
https://github.com/rust-lang/crates.io/actions/runs/13632195641/job/38102274110?pr=10740#step:6:239
and
https://github.com/rust-lang/crates.io/actions/runs/13632195641/job/38102274110?pr=10740#step:6:254