Add SslStream test to validate synchronous invocation on underlying Stream (dotnet...
authorStephen Toub <stoub@microsoft.com>
Sun, 17 Mar 2019 09:40:21 +0000 (05:40 -0400)
committerGitHub <noreply@github.com>
Sun, 17 Mar 2019 09:40:21 +0000 (05:40 -0400)
commite6dc53b8c7f6ea5999809b0a556081421d39c06d
treea0202861821d8573986d0abd8c2a02c88b840da5
parentb3de1a5b74ea5e8e6575a567f684a84792cdf02e
Add SslStream test to validate synchronous invocation on underlying Stream (dotnet/corefx#36097)

* Change SslStreamStreamToStreamTest_Sync to actually be synchronous

* Add SslStream test to validate synchronous invocation on underlying Stream

SslStream doesn't introduce its own asynchrony.  The only reason an asynchronous operation on SslStream should complete asynchronously is because of an asynchronous call made on its underlying stream completes asynchronously.  This adds tests to validate that, e.g. the tests would fail if we started using Task.Run in the SslStream implementation to invoke operations on the underlying stream.

Commit migrated from https://github.com/dotnet/corefx/commit/5f4e3ce4ec775a960cb379a0edef33406b37befe
src/libraries/System.Net.Security/tests/FunctionalTests/SslStreamStreamToStreamTest.cs