From 5073d4fdaf29cf3827be9ae8d62969757aa5d8dc Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Tue, 14 Mar 2017 11:02:49 -0700 Subject: [PATCH] Re-add .NET Framework to tests and other cleanup (#1494) --- build/dependencies.props | 11 ++++++-- .../LargeResponseApp/LargeResponseApp.csproj | 3 -- samples/SampleApp/SampleApp.csproj | 5 +--- ...oft.AspNetCore.Server.Kestrel.Https.csproj | 2 +- ...Microsoft.AspNetCore.Server.Kestrel.csproj | 8 +++--- ...Core.Server.Kestrel.FunctionalTests.csproj | 28 ++++++++----------- ...pNetCore.Server.Kestrel.Performance.csproj | 2 +- .../FrameRequestStreamTests.cs | 2 +- .../FrameResponseStreamTests.cs | 2 +- ...soft.AspNetCore.Server.KestrelTests.csproj | 23 ++++++--------- .../NetworkingTests.cs | 6 ++-- .../xunit.runner.json | 4 +++ test/shared/TestResources.cs | 4 +-- tools/CodeGenerator/CodeGenerator.csproj | 4 +-- 14 files changed, 48 insertions(+), 56 deletions(-) create mode 100644 test/Microsoft.AspNetCore.Server.KestrelTests/xunit.runner.json diff --git a/build/dependencies.props b/build/dependencies.props index 3c441802d9..cc4fbc7fdc 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -1,9 +1,14 @@ - 1.6.1 + 1.2.0-* + 0.1.0-* + 0.1.0-* 4.3.0 1.9.1 - 0.1.0-* - 0.1.0-* + 9.0.1 + 4.7.1 + 1.6.1 + 15.0.0 + 2.2.0 diff --git a/samples/LargeResponseApp/LargeResponseApp.csproj b/samples/LargeResponseApp/LargeResponseApp.csproj index 3af02d73c5..9feeea1d07 100644 --- a/samples/LargeResponseApp/LargeResponseApp.csproj +++ b/samples/LargeResponseApp/LargeResponseApp.csproj @@ -4,9 +4,6 @@ net451;netcoreapp1.1 - Exe - - win7-x64 false diff --git a/samples/SampleApp/SampleApp.csproj b/samples/SampleApp/SampleApp.csproj index 5fcf04fb03..fa311e28dc 100644 --- a/samples/SampleApp/SampleApp.csproj +++ b/samples/SampleApp/SampleApp.csproj @@ -4,9 +4,6 @@ netcoreapp1.1;net451 - Exe - - win7-x64 false @@ -19,7 +16,7 @@ - + diff --git a/src/Microsoft.AspNetCore.Server.Kestrel.Https/Microsoft.AspNetCore.Server.Kestrel.Https.csproj b/src/Microsoft.AspNetCore.Server.Kestrel.Https/Microsoft.AspNetCore.Server.Kestrel.Https.csproj index a314782a45..5187bdb18d 100644 --- a/src/Microsoft.AspNetCore.Server.Kestrel.Https/Microsoft.AspNetCore.Server.Kestrel.Https.csproj +++ b/src/Microsoft.AspNetCore.Server.Kestrel.Https/Microsoft.AspNetCore.Server.Kestrel.Https.csproj @@ -15,7 +15,7 @@ - + diff --git a/src/Microsoft.AspNetCore.Server.Kestrel/Microsoft.AspNetCore.Server.Kestrel.csproj b/src/Microsoft.AspNetCore.Server.Kestrel/Microsoft.AspNetCore.Server.Kestrel.csproj index beacc7f230..73ba4a6cd3 100644 --- a/src/Microsoft.AspNetCore.Server.Kestrel/Microsoft.AspNetCore.Server.Kestrel.csproj +++ b/src/Microsoft.AspNetCore.Server.Kestrel/Microsoft.AspNetCore.Server.Kestrel.csproj @@ -13,9 +13,9 @@ - - - + + + @@ -28,4 +28,4 @@ - \ No newline at end of file + diff --git a/test/Microsoft.AspNetCore.Server.Kestrel.FunctionalTests/Microsoft.AspNetCore.Server.Kestrel.FunctionalTests.csproj b/test/Microsoft.AspNetCore.Server.Kestrel.FunctionalTests/Microsoft.AspNetCore.Server.Kestrel.FunctionalTests.csproj index fe6cbe0da0..9615b4a06d 100644 --- a/test/Microsoft.AspNetCore.Server.Kestrel.FunctionalTests/Microsoft.AspNetCore.Server.Kestrel.FunctionalTests.csproj +++ b/test/Microsoft.AspNetCore.Server.Kestrel.FunctionalTests/Microsoft.AspNetCore.Server.Kestrel.FunctionalTests.csproj @@ -3,10 +3,9 @@ - netcoreapp1.1 + netcoreapp1.1;net46 netcoreapp1.1 - - win7-x64 + x64 @@ -19,19 +18,14 @@ - - - - - - - - - - - - - + + + + + + + + @@ -54,4 +48,4 @@ - \ No newline at end of file + diff --git a/test/Microsoft.AspNetCore.Server.Kestrel.Performance/Microsoft.AspNetCore.Server.Kestrel.Performance.csproj b/test/Microsoft.AspNetCore.Server.Kestrel.Performance/Microsoft.AspNetCore.Server.Kestrel.Performance.csproj index e010d7fce2..88b306a3d0 100644 --- a/test/Microsoft.AspNetCore.Server.Kestrel.Performance/Microsoft.AspNetCore.Server.Kestrel.Performance.csproj +++ b/test/Microsoft.AspNetCore.Server.Kestrel.Performance/Microsoft.AspNetCore.Server.Kestrel.Performance.csproj @@ -24,7 +24,7 @@ - + diff --git a/test/Microsoft.AspNetCore.Server.KestrelTests/FrameRequestStreamTests.cs b/test/Microsoft.AspNetCore.Server.KestrelTests/FrameRequestStreamTests.cs index ac5bc1b354..32f3e37d73 100644 --- a/test/Microsoft.AspNetCore.Server.KestrelTests/FrameRequestStreamTests.cs +++ b/test/Microsoft.AspNetCore.Server.KestrelTests/FrameRequestStreamTests.cs @@ -83,7 +83,7 @@ namespace Microsoft.AspNetCore.Server.KestrelTests await Assert.ThrowsAsync(() => stream.WriteAsync(new byte[1], 0, 1)); } -#if NET452 +#if NET46 [Fact] public void BeginWriteThrows() { diff --git a/test/Microsoft.AspNetCore.Server.KestrelTests/FrameResponseStreamTests.cs b/test/Microsoft.AspNetCore.Server.KestrelTests/FrameResponseStreamTests.cs index 9c791b059d..b1f155ad52 100644 --- a/test/Microsoft.AspNetCore.Server.KestrelTests/FrameResponseStreamTests.cs +++ b/test/Microsoft.AspNetCore.Server.KestrelTests/FrameResponseStreamTests.cs @@ -54,7 +54,7 @@ namespace Microsoft.AspNetCore.Server.KestrelTests await Assert.ThrowsAsync(() => stream.ReadAsync(new byte[1], 0, 1)); } -#if NET452 +#if NET46 [Fact] public void BeginReadThrows() { diff --git a/test/Microsoft.AspNetCore.Server.KestrelTests/Microsoft.AspNetCore.Server.KestrelTests.csproj b/test/Microsoft.AspNetCore.Server.KestrelTests/Microsoft.AspNetCore.Server.KestrelTests.csproj index f0a9a37c51..382492d093 100644 --- a/test/Microsoft.AspNetCore.Server.KestrelTests/Microsoft.AspNetCore.Server.KestrelTests.csproj +++ b/test/Microsoft.AspNetCore.Server.KestrelTests/Microsoft.AspNetCore.Server.KestrelTests.csproj @@ -3,14 +3,14 @@ - netcoreapp1.1 + netcoreapp1.1;net46 netcoreapp1.1 + x64 true - - win7-x64 + @@ -20,20 +20,15 @@ - - - - - - - - - - + + + + + - \ No newline at end of file + diff --git a/test/Microsoft.AspNetCore.Server.KestrelTests/NetworkingTests.cs b/test/Microsoft.AspNetCore.Server.KestrelTests/NetworkingTests.cs index afa087f430..90e8fd6cdf 100644 --- a/test/Microsoft.AspNetCore.Server.KestrelTests/NetworkingTests.cs +++ b/test/Microsoft.AspNetCore.Server.KestrelTests/NetworkingTests.cs @@ -131,7 +131,7 @@ namespace Microsoft.AspNetCore.Server.KestrelTests var t = Task.Run(async () => { var socket = TestConnection.CreateConnectedLoopbackSocket(port); -#if NET452 +#if NET46 await Task.Factory.FromAsync( socket.BeginSend, socket.EndSend, @@ -205,7 +205,7 @@ namespace Microsoft.AspNetCore.Server.KestrelTests var t = Task.Run(async () => { var socket = TestConnection.CreateConnectedLoopbackSocket(port); -#if NET452 +#if NET46 await Task.Factory.FromAsync( socket.BeginSend, socket.EndSend, @@ -221,7 +221,7 @@ namespace Microsoft.AspNetCore.Server.KestrelTests var buffer = new ArraySegment(new byte[2048]); while (true) { -#if NET452 +#if NET46 var count = await Task.Factory.FromAsync( socket.BeginReceive, socket.EndReceive, diff --git a/test/Microsoft.AspNetCore.Server.KestrelTests/xunit.runner.json b/test/Microsoft.AspNetCore.Server.KestrelTests/xunit.runner.json new file mode 100644 index 0000000000..bbd346e81c --- /dev/null +++ b/test/Microsoft.AspNetCore.Server.KestrelTests/xunit.runner.json @@ -0,0 +1,4 @@ +{ + "$schema": "http://json.schemastore.org/xunit.runner.schema", + "appDomain": "denied" +} diff --git a/test/shared/TestResources.cs b/test/shared/TestResources.cs index 64a3161914..ff0b12b050 100644 --- a/test/shared/TestResources.cs +++ b/test/shared/TestResources.cs @@ -9,8 +9,8 @@ namespace Microsoft.AspNetCore.Testing public static class TestResources { private static readonly string _testCertificatePath = -#if NET452 - Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "testCert.pfx"); +#if NET46 + Path.Combine(Directory.GetCurrentDirectory(), "testCert.pfx"); #else Path.Combine(AppContext.BaseDirectory, "testCert.pfx"); #endif diff --git a/tools/CodeGenerator/CodeGenerator.csproj b/tools/CodeGenerator/CodeGenerator.csproj index d581f31921..ac31790238 100644 --- a/tools/CodeGenerator/CodeGenerator.csproj +++ b/tools/CodeGenerator/CodeGenerator.csproj @@ -9,8 +9,8 @@ - - + +