-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add stream conformance tests for SocketsHttpHandler HTTP/1.1 streams (#…
…44204) * Add stream conformance tests for SocketsHttpHandler HTTP/1.1 streams * Address PR feedback
- Loading branch information
1 parent
cd714d6
commit ad6ddf6
Showing
11 changed files
with
308 additions
and
150 deletions.
There are no files selected for viewing
166 changes: 100 additions & 66 deletions
166
src/libraries/Common/tests/Tests/System/IO/StreamConformanceTests.cs
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 9 additions & 8 deletions
17
src/libraries/System.IO/tests/MemoryStream/MemoryStreamTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 8 additions & 6 deletions
14
src/libraries/System.IO/tests/Stream/SyncStreamConformanceTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,21 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
using System.Threading.Tasks; | ||
|
||
namespace System.IO.Tests | ||
{ | ||
public class SyncStreamConformanceTests : StandaloneStreamConformanceTests | ||
{ | ||
protected override bool NopFlushCompletesSynchronously => false; | ||
|
||
protected override Stream CreateReadOnlyStreamCore(byte[] initialData) => | ||
Stream.Synchronized(new MemoryStream(initialData ?? Array.Empty<byte>(), writable: false)); | ||
protected override Task<Stream> CreateReadOnlyStreamCore(byte[] initialData) => | ||
Task.FromResult(Stream.Synchronized(new MemoryStream(initialData ?? Array.Empty<byte>(), writable: false))); | ||
|
||
protected override Stream CreateReadWriteStreamCore(byte[] initialData) => | ||
Stream.Synchronized(initialData != null ? new MemoryStream(initialData) : new MemoryStream()); | ||
protected override Task<Stream> CreateReadWriteStreamCore(byte[] initialData) => | ||
Task.FromResult(Stream.Synchronized(initialData != null ? new MemoryStream(initialData) : new MemoryStream())); | ||
|
||
protected override Stream CreateWriteOnlyStreamCore(byte[] initialData) => | ||
null; | ||
protected override Task<Stream> CreateWriteOnlyStreamCore(byte[] initialData) => | ||
Task.FromResult<Stream>(null); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 0 additions & 41 deletions
41
src/libraries/System.Net.Http/tests/FunctionalTests/RawConnectionStreamTest.cs
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.