From 8cfb60ea1d9162b7b349c118e50e63a246b661d3 Mon Sep 17 00:00:00 2001 From: Cijo Thomas Date: Mon, 30 Apr 2018 18:17:36 -0700 Subject: [PATCH 1/3] Added Stop call to HostingEngine before dispose is called. This is to ensure that the host is completely shut before next Func test begins --- test/FunctionalTestUtils20/InProcessServer.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/FunctionalTestUtils20/InProcessServer.cs b/test/FunctionalTestUtils20/InProcessServer.cs index 5345deba..c4b4dc47 100644 --- a/test/FunctionalTestUtils20/InProcessServer.cs +++ b/test/FunctionalTestUtils20/InProcessServer.cs @@ -100,6 +100,9 @@ public void Dispose() { if (this.hostingEngine != null) { + this.output.WriteLine("Stopping host at:" + DateTime.Now.ToString("G")); + this.hostingEngine.StopAsync(TimeSpan.FromSeconds(5)).Wait(); + this.output.WriteLine("Stopped host at:" + DateTime.Now.ToString("G")); this.hostingEngine.Dispose(); } From a0b5288f8b52a4cd825f6257c228143f8aa77ec1 Mon Sep 17 00:00:00 2001 From: Cijo Thomas Date: Tue, 1 May 2018 13:10:44 -0700 Subject: [PATCH 2/3] All test projects are modified to contain only essentials in csproj. Also made project output type as exe. This is to prevent the unknown exception when debugging tests from visual studio. --- .../EmptyApp.FunctionalTests.csproj | 26 ++++++-------- .../EmptyApp20.FunctionalTests20.csproj | 31 ++++++++-------- .../FunctionalTestUtils.csproj | 6 +++- .../FunctionalTestUtils20.csproj | 18 +++++----- test/FunctionalTestUtils20/InProcessServer.cs | 3 -- .../MVCFramework.FunctionalTests.csproj | 26 ++++++-------- .../MVCFramework20.FunctionalTests20.csproj | 36 +++++++------------ .../WebApi.FunctionalTests.csproj | 26 ++++++-------- .../WebApi20.FunctionalTests20.csproj | 33 ++++++++--------- 9 files changed, 86 insertions(+), 119 deletions(-) diff --git a/test/EmptyApp.FunctionalTests/EmptyApp.FunctionalTests.csproj b/test/EmptyApp.FunctionalTests/EmptyApp.FunctionalTests.csproj index 0a6bb771..39205633 100644 --- a/test/EmptyApp.FunctionalTests/EmptyApp.FunctionalTests.csproj +++ b/test/EmptyApp.FunctionalTests/EmptyApp.FunctionalTests.csproj @@ -3,29 +3,25 @@ 2.0.0 net46;netcoreapp1.0 - netcoreapp1.0 - win7-x86 - true - true - EmptyApp.FunctionalTests - EmptyApp.FunctionalTests - true - + netcoreapp1.0 + win7-x86 + 1.1.5 ..\..\artifacts\test\$(MSBuildProjectName) - ..\..\artifacts\obj\test\$(MSBuildProjectName) - pdbonly - true + ..\..\artifacts\obj\test\$(MSBuildProjectName) + exe - - - + - + + + + + diff --git a/test/EmptyApp20.FunctionalTests/EmptyApp20.FunctionalTests20.csproj b/test/EmptyApp20.FunctionalTests/EmptyApp20.FunctionalTests20.csproj index 46daf893..1032e703 100644 --- a/test/EmptyApp20.FunctionalTests/EmptyApp20.FunctionalTests20.csproj +++ b/test/EmptyApp20.FunctionalTests/EmptyApp20.FunctionalTests20.csproj @@ -2,30 +2,27 @@ 2.0.0 - netcoreapp2.0;net461 - netcoreapp2.0 - win7-x86 - true - EmptyApp20.FunctionalTests20 - EmptyApp20.FunctionalTests - true - 2.0.0 + net461;netstandard2.0 + netcoreapp2.0 + win7-x86 ..\..\artifacts\test\$(MSBuildProjectName) - ..\..\artifacts\obj\test\$(MSBuildProjectName) - pdbonly - true - true + ..\..\artifacts\obj\test\$(MSBuildProjectName) + + exe + - - - - - + + + + + + + diff --git a/test/FunctionalTestUtils/FunctionalTestUtils.csproj b/test/FunctionalTestUtils/FunctionalTestUtils.csproj index a392546f..8574d9bc 100644 --- a/test/FunctionalTestUtils/FunctionalTestUtils.csproj +++ b/test/FunctionalTestUtils/FunctionalTestUtils.csproj @@ -18,7 +18,11 @@ - + + + + + diff --git a/test/FunctionalTestUtils20/FunctionalTestUtils20.csproj b/test/FunctionalTestUtils20/FunctionalTestUtils20.csproj index cd959256..2b77fd08 100644 --- a/test/FunctionalTestUtils20/FunctionalTestUtils20.csproj +++ b/test/FunctionalTestUtils20/FunctionalTestUtils20.csproj @@ -1,12 +1,8 @@  - - 1.0.2 + net461;netstandard2.0 - netstandard2.0 - true - FunctionalTestUtils20 - FunctionalTestUtils + netstandard2.0 2.0.0 ..\..\artifacts\test\$(MSBuildProjectName) ..\..\artifacts\obj\test\$(MSBuildProjectName) @@ -21,9 +17,13 @@ - - - + + + + + + + diff --git a/test/FunctionalTestUtils20/InProcessServer.cs b/test/FunctionalTestUtils20/InProcessServer.cs index c4b4dc47..5345deba 100644 --- a/test/FunctionalTestUtils20/InProcessServer.cs +++ b/test/FunctionalTestUtils20/InProcessServer.cs @@ -100,9 +100,6 @@ public void Dispose() { if (this.hostingEngine != null) { - this.output.WriteLine("Stopping host at:" + DateTime.Now.ToString("G")); - this.hostingEngine.StopAsync(TimeSpan.FromSeconds(5)).Wait(); - this.output.WriteLine("Stopped host at:" + DateTime.Now.ToString("G")); this.hostingEngine.Dispose(); } diff --git a/test/MVCFramework.FunctionalTests/MVCFramework.FunctionalTests.csproj b/test/MVCFramework.FunctionalTests/MVCFramework.FunctionalTests.csproj index c81613fb..8784b4cb 100644 --- a/test/MVCFramework.FunctionalTests/MVCFramework.FunctionalTests.csproj +++ b/test/MVCFramework.FunctionalTests/MVCFramework.FunctionalTests.csproj @@ -3,20 +3,12 @@ 2.0.0 net46;netcoreapp1.0 - netcoreapp1.0 - win7-x86 - true - MVCFramework.FunctionalTests - MVCFramework.FunctionalTests - true - aspnet-MVCFramework45.FunctionalTests-60cfc765-2dc9-454c-bb34-dc379ed92cd0 + netcoreapp1.0 + win7-x86 1.1.5 ..\..\artifacts\test\$(MSBuildProjectName) - ..\..\artifacts\obj\test\$(MSBuildProjectName) - true - true - pdbonly - true + ..\..\artifacts\obj\test\$(MSBuildProjectName) + exe @@ -40,9 +32,7 @@ - - - + @@ -60,7 +50,11 @@ - + + + + + diff --git a/test/MVCFramework20.FunctionalTests/MVCFramework20.FunctionalTests20.csproj b/test/MVCFramework20.FunctionalTests/MVCFramework20.FunctionalTests20.csproj index 053ae4af..59b78234 100644 --- a/test/MVCFramework20.FunctionalTests/MVCFramework20.FunctionalTests20.csproj +++ b/test/MVCFramework20.FunctionalTests/MVCFramework20.FunctionalTests20.csproj @@ -2,23 +2,13 @@ 2.0.0 - netcoreapp2.0;net461 - netcoreapp2.0 - win7-x86 - true - MVCFramework20.FunctionalTests20 - MVCFramework.FunctionalTests - true - aspnet-MVCFramework45.FunctionalTests-60cfc765-2dc9-454c-bb34-dc379ed92cd0 - 2.0.0 + net461;netstandard2.0 + netcoreapp2.0 + win7-x86 ..\..\artifacts\test\$(MSBuildProjectName) - ..\..\artifacts\obj\test\$(MSBuildProjectName) - true - true - pdbonly - true + ..\..\artifacts\obj\test\$(MSBuildProjectName) - Library + exe @@ -43,8 +33,7 @@ - - + @@ -62,17 +51,16 @@ - - - - + - - + + + + - + diff --git a/test/WebApi.FunctionalTests/WebApi.FunctionalTests.csproj b/test/WebApi.FunctionalTests/WebApi.FunctionalTests.csproj index dd468cf9..7c54a2e5 100644 --- a/test/WebApi.FunctionalTests/WebApi.FunctionalTests.csproj +++ b/test/WebApi.FunctionalTests/WebApi.FunctionalTests.csproj @@ -3,18 +3,12 @@ 2.0.0 net46;netcoreapp1.0 - netcoreapp1.0 - win7-x86 - true - WebApi.FunctionalTests - WebApi.FunctionalTests - true - $(PackageTargetFallback);portable-net45+win8 + netcoreapp1.0 + win7-x86 1.1.5 ..\..\artifacts\test\$(MSBuildProjectName) - ..\..\artifacts\obj\test\$(MSBuildProjectName) - pdbonly - true + ..\..\artifacts\obj\test\$(MSBuildProjectName) + exe @@ -32,15 +26,17 @@ - - - + - - + + + + + + diff --git a/test/WebApi20.FunctionalTests/WebApi20.FunctionalTests20.csproj b/test/WebApi20.FunctionalTests/WebApi20.FunctionalTests20.csproj index 8ffc683c..642c0c79 100644 --- a/test/WebApi20.FunctionalTests/WebApi20.FunctionalTests20.csproj +++ b/test/WebApi20.FunctionalTests/WebApi20.FunctionalTests20.csproj @@ -2,20 +2,13 @@ 2.0.0 - netcoreapp2.0;net461 - netcoreapp2.0 - win7-x86 - true - WebApi20.FunctionalTests20 - WebApi20.FunctionalTests - true - 2.0.0 + net461;netstandard2.0 + netcoreapp2.0 + win7-x86 ..\..\artifacts\test\$(MSBuildProjectName) - ..\..\artifacts\obj\test\$(MSBuildProjectName) - pdbonly - true + ..\..\artifacts\obj\test\$(MSBuildProjectName) - Library + exe @@ -34,16 +27,18 @@ - - + - - - - - + + + + + + + + From 76974f753d2fffa9f60a0b8e822df8544f29531f Mon Sep 17 00:00:00 2001 From: Cijo Thomas Date: Tue, 1 May 2018 13:22:17 -0700 Subject: [PATCH 3/3] Buildfix --- test/WebApi.FunctionalTests/WebApi.FunctionalTests.csproj | 1 + 1 file changed, 1 insertion(+) diff --git a/test/WebApi.FunctionalTests/WebApi.FunctionalTests.csproj b/test/WebApi.FunctionalTests/WebApi.FunctionalTests.csproj index 7c54a2e5..6e4fa73c 100644 --- a/test/WebApi.FunctionalTests/WebApi.FunctionalTests.csproj +++ b/test/WebApi.FunctionalTests/WebApi.FunctionalTests.csproj @@ -5,6 +5,7 @@ net46;netcoreapp1.0 netcoreapp1.0 win7-x86 + $(PackageTargetFallback);portable-net45+win8 1.1.5 ..\..\artifacts\test\$(MSBuildProjectName) ..\..\artifacts\obj\test\$(MSBuildProjectName)