-
Notifications
You must be signed in to change notification settings - Fork 692
Increase retry time in AppBar_Change_Theme_ReloadPage #9317
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
Increase retry time in AppBar_Change_Theme_ReloadPage #9317
Conversation
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 increases the retry count in the asynchronous test helper to address the long timeout issues observed in theme change tests. Key changes include the addition of a customizable "retries" parameter in both overloads of AssertIsTrueRetryAsync and its use in AppBarTests to allow for longer timeouts.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
tests/Shared/AsyncTestHelpers.cs | Added an optional "retries" parameter to improve timeout control. |
tests/Aspire.Dashboard.Tests/Integration/Playwright/AppBarTests.cs | Updated test call to use the increased retry count for better stability. |
: $"The operation at {filePath}:{lineNumber} timed out after reaching the limit of {timeout.TotalMilliseconds}ms."; | ||
|
||
public static Task AssertIsTrueRetryAsync(Func<bool> assert, string message, ILogger? logger = null) | ||
public static Task AssertIsTrueRetryAsync(Func<bool> assert, string message, ILogger? logger = null, int retries = 10) |
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.
Consider updating the method documentation for AssertIsTrueRetryAsync to include details about the new 'retries' parameter and its impact on the timeout behavior.
Copilot uses AI. Check for mistakes.
checkbox = page.GetByRole(AriaRole.Radio).And(page.GetByText(checkboxText)).First; | ||
|
||
await AsyncTestHelpers.AssertIsTrueRetryAsync( | ||
async () => await checkbox.IsCheckedAsync(), |
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.
[nitpick] The lambda 'async () => await checkbox.IsCheckedAsync()' could be simplified to '() => checkbox.IsCheckedAsync()' since there's no additional async processing required, which can make the code more concise.
async () => await checkbox.IsCheckedAsync(), | |
() => checkbox.IsCheckedAsync(), |
Copilot uses AI. Check for mistakes.
Would it be useful to get screenshots to see what might be going on? Is the webpage completely stuck, or not loading because of other errors? |
don't we get screenshots (playwright?) |
Description
This test seems to take a looong time to complete even on hardware (~15-20 seconds). Based on the test failing on the test runner, I think we just need to increase the timeout. A lot.
Fixes #9152
Checklist
<remarks />
and<code />
elements on your triple slash comments?doc-idea
templatebreaking-change
templatediagnostic
template