Skip to content
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

Add retries to some FSW tests #68368

Merged
merged 5 commits into from
Apr 23, 2022
Merged

Add retries to some FSW tests #68368

merged 5 commits into from
Apr 23, 2022

Conversation

danmoseley
Copy link
Member

@danmoseley danmoseley commented Apr 22, 2022

@ghost
Copy link

ghost commented Apr 22, 2022

Tagging subscribers to this area: @dotnet/area-system-io
See info in area-owners.md if you want to be subscribed.

Issue Details
Author: danmoseley
Assignees: -
Labels:

area-System.IO

Milestone: -

@danmoseley
Copy link
Member Author

Since not one of these has failed on Mac although I see them running there (I guess we have a more robust approach on Mac) I could potentially disable the retry mechanism when on Mac. This is fine for now.

@danmoseley danmoseley requested a review from jozkee April 22, 2022 03:15
@danmoseley danmoseley requested a review from adamsitnik April 22, 2022 22:41
Copy link
Member

@carlossanlop carlossanlop left a comment

Choose a reason for hiding this comment

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

The new retries look good, but I do think the RetryHelper.Execute method that logs the diagnostic should be exclusive to FileSystemWatcher, to avoid an unnecessary Contains check on all tests that are have the helix bool returning true.

@danmoseley danmoseley merged commit a11266d into dotnet:main Apr 23, 2022
@@ -22,6 +23,8 @@ public static partial class PlatformDetection
// do it in a way that failures don't cascade.
//

public static readonly bool IsInHelix = Environment.GetEnvironmentVariables().Keys.Cast<string>().Where(key => key.StartsWith("HELIX")).Any();
Copy link
Member

Choose a reason for hiding this comment

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

This should be done lazily, similar to how other expensive properties in PlatformDetection are initialized lazily.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll fix

@ghost ghost locked as resolved and limited conversation to collaborators May 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants