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

Serialize SendPacketsAsync tests #63702

Merged
merged 1 commit into from
Jan 15, 2022
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
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