Skip to content

Commit

Permalink
Skip tests using AsyncIO in FileSystemAclExtensionsTests where it's n…
Browse files Browse the repository at this point in the history
…ot supported (#64212)

The mono runtime does not yet support AsyncIO on Windows and there were some tests failing on CI because of it.
Fixes #64221
  • Loading branch information
steveisok authored Jan 25, 2022
1 parent 802dc68 commit d910ce3
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,8 @@ from options in Enum.GetValues<FileOptions>()
where !(rights == FileSystemRights.CreateFiles &&
(mode == FileMode.Append || mode == FileMode.Create || mode == FileMode.CreateNew)) &&
!(mode == FileMode.Truncate && rights != FileSystemRights.Write) &&
options != FileOptions.Encrypted // Using FileOptions.Encrypted throws UnauthorizedAccessException when attempting to read the created file
(options != FileOptions.Encrypted && // Using FileOptions.Encrypted throws UnauthorizedAccessException when attempting to read the created file
!(options == FileOptions.Asynchronous && !PlatformDetection.IsAsyncFileIOSupported))// Async IO not supported on Windows using Mono runtime https://github.com/dotnet/runtime/issues/34582
select new object[] { mode, rights, share, options };

[Theory]
Expand All @@ -432,7 +433,8 @@ public static IEnumerable<object[]> ReadRights_AllArguments_Data() =>
from rights in s_readableRights
from share in Enum.GetValues<FileShare>()
from options in Enum.GetValues<FileOptions>()
where options != FileOptions.Encrypted // Using FileOptions.Encrypted throws UnauthorizedAccessException when attempting to read the created file
where options != FileOptions.Encrypted && // Using FileOptions.Encrypted throws UnauthorizedAccessException when attempting to read the created file
!(options == FileOptions.Asynchronous && !PlatformDetection.IsAsyncFileIOSupported) // Async IO not supported on Windows using Mono runtime https://github.com/dotnet/runtime/issues/34582
select new object[] { mode, rights, share, options };

[Theory]
Expand Down

0 comments on commit d910ce3

Please sign in to comment.