Skip to content

Commit

Permalink
serialize SendPacketsAsync tests (#63702)
Browse files Browse the repository at this point in the history
  • Loading branch information
antonfirsov committed Jan 15, 2022
1 parent 40047f2 commit 9daaab1
Showing 1 changed file with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

namespace System.Net.Sockets.Tests
{
[Collection(nameof(DisableParallelization))]
public class SendPacketsAsync : IDisposable
{
private readonly ITestOutputHelper _log;
Expand Down Expand Up @@ -518,10 +519,7 @@ public void SendPacketsElement_FileStreamMultiPart_Success()
}
}

public static bool IsNotWindows11 = !PlatformDetection.IsWindows10Version22000OrGreater;

[ActiveIssue("https://github.com/dotnet/runtime/issues/58898")]
[ConditionalFact(nameof(IsNotWindows11))]
[Fact]
public void SendPacketsElement_FileStreamLargeOffset_Throws()
{
using (var stream = new FileStream(TestFileName, FileMode.Open, FileAccess.Read, FileShare.Read, 4096, useAsync: true))
Expand All @@ -544,8 +542,7 @@ public void SendPacketsElement_FileStreamLargeCount_Throws()
}
}

[ActiveIssue("https://github.com/dotnet/runtime/issues/58898")]
[ConditionalFact(nameof(IsNotWindows11))]
[Fact]
public void SendPacketsElement_FileStreamWithOptions_Success() {
using (var stream = new FileStream(TestFileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite, 4096, FileOptions.Asynchronous | FileOptions.SequentialScan)) {
var element = new SendPacketsElement(stream, 0, s_testFileSize);
Expand Down Expand Up @@ -576,8 +573,7 @@ public void SendPacketsElement_FileStreamMultiPartMixed_Success() {
}
}

[ActiveIssue("https://github.com/dotnet/runtime/issues/58898")]
[ConditionalFact(nameof(IsNotWindows11))]
[Fact]
public void SendPacketsElement_FileStreamMultiPartMixed_MultipleFileStreams_Success() {
using (var stream = new FileStream(TestFileName, FileMode.Open, FileAccess.Read, FileShare.Read, 4096, FileOptions.Asynchronous))
using (var stream2 = new FileStream(TestFileName, FileMode.Open, FileAccess.Read, FileShare.Read, 4096, FileOptions.Asynchronous)) {
Expand Down

0 comments on commit 9daaab1

Please sign in to comment.