-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Test fix: FileStream DeleteOnClose run on OuterLoop with longer timeout #60149
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
Conversation
|
Tagging subscribers to this area: @dotnet/area-system-io Issue DetailsFixes #60147 A new unit test was added in #55327 to fix a Unix-only bug. This PR ensures the test is limited to only run on Unix, in both Pending confirmation from @tmds that this unit test was only intended to be run on Unix.
|
src/libraries/System.IO.FileSystem/tests/System.IO.FileSystem.Tests.csproj
Outdated
Show resolved
Hide resolved
|
Hey @carlossanlop what's the status? Can this be merged? |
adamsitnik
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.
LGTM, but a simpler solution exists:
| [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsFileLockingEnabled), nameof(PlatformDetection.IsThreadingSupported))] |
- [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsFileLockingEnabled), nameof(PlatformDetection.IsThreadingSupported))]
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsFileLockingEnabled), nameof(PlatformDetection.IsThreadingSupported), nameof(PlatformDetection.IsNotWindows))]
|
See discussion on #60147. Alternative to skipping the test on Windows is to increase the timeout, and move it to OuterLoop if the local run on Windows takes too long. (On Linux, the local run takes a couple of seconds). |
|
Ok, @tmds. Since we expect this test to pass on both Windows and Linux, I'll apply your suggestion:
cc @adamsitnik who already gave me a sign-off; don't merge it yet. |
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.
@tmds I'd like to assume this is the timeout you wanted me to extend? I ask because there are 3 Task.Delay calls above. Should I extend those as well? I wonder if 1 ms delays are long enough.
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.
This is the one.
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.
|
@kunalspathak can I ignore this build failure? It says you manually cancelled it. |
Yes, the pipeline is still under development and I forgot to have proper setting to not trigger it on every PR. |

Fixes #60147
A new unit test was added in #55327 to fix a Unix-only bug. This PR ensures the test is limited to only run on Unix, in both
System.IO.FileSystem.Tests.csprojand inSystem.IO.FileSystem.Net5Compat.Tests.csproj.Pending confirmation from @tmds that this unit test was only intended to be run on Unix.