Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
serialize SendPacketsAsync tests
  • Loading branch information
antonfirsov committed Jan 12, 2022
commit 3a11c112f16065c932f938ff894e449bb5ecc5fc
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