-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[release/8.0] Use wait assert in flaky tests #63565
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
[release/8.0] Use wait assert in flaky tests #63565
Conversation
RadioButtonGetsResetAfterSubmittingEnhancedForm
2nd attempt: fine but |
…erAndWebAssembly`
/azp run (3rd attempt: fine) |
Azure Pipelines successfully started running 3 pipeline(s). |
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.
Pull Request Overview
This PR backports a fix for flaky end-to-end tests by replacing immediate Assert
calls with WaitAssert
and Browser.True()
methods to handle timing issues in web UI interactions. The changes specifically target tests that were experiencing low pass rates (20% and 0%) due to race conditions between UI state changes and assertions.
Key changes:
- Replace immediate assertions with wait-based assertions in form handling tests
- Update navigation tests to use browser-specific assertion methods with proper timing
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
File | Description |
---|---|
FormWithParentBindingContextTest.cs | Converts Assert.True/False calls to WaitAssert.True/False for radio button and checkbox state verification |
EnhancedNavigationTest.cs | Replaces Assert.EndsWith with Browser.True() for URI validation with proper wait handling |
RadioButtonGetsResetAfterSubmittingEnhancedForm
RadioButtonGetsResetAfterSubmittingEnhancedForm
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
Not related tests in aspnetcore-ci are failing consequently with #63582. |
RadioButtonGetsResetAfterSubmittingEnhancedForm
RadioButtonGetsResetAfterSubmittingEnhancedForm
#63556It was done to main branch as well. The pass rate without this PR is 20%. This PR checks if just backporting the assert fix is enough or was there a bigger framework fix between ne9 and ne8. After 6 runs the failure was not reproduced. If it's not fully fixed then at least it significantly improved the pass rate.
It used to have 0% pass rate before this PR. With the fix, it did not fail yet.
CanSendAndReceiveUserMessagesUserNameWithPatternIsTreatedAsLiteral
#63582.