From 20ed4409abd82155f83e3d24575417352241d740 Mon Sep 17 00:00:00 2001 From: jhkimnew Date: Wed, 7 Mar 2018 18:09:22 -0800 Subject: [PATCH] Jhkim/fix inproc2 (#300) * Fix test --- test/AspNetCoreModule.Test/Framework/TestWebSite.cs | 7 ++++++- test/AspNetCoreModule.Test/FunctionalTest.cs | 3 ++- test/AspNetCoreModule.Test/FunctionalTestHelper.cs | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/test/AspNetCoreModule.Test/Framework/TestWebSite.cs b/test/AspNetCoreModule.Test/Framework/TestWebSite.cs index 7af3464..9b32689 100644 --- a/test/AspNetCoreModule.Test/Framework/TestWebSite.cs +++ b/test/AspNetCoreModule.Test/Framework/TestWebSite.cs @@ -446,7 +446,12 @@ namespace AspNetCoreModule.Test.Framework succeeded = true; break; } - backendProcess.WaitForExit(1000); + + if (backendProcess.WaitForExit(1000)) + { + succeeded = true; + break; + } if (this.IisServerType == ServerType.IISExpress && i == 3) { diff --git a/test/AspNetCoreModule.Test/FunctionalTest.cs b/test/AspNetCoreModule.Test/FunctionalTest.cs index 08e42c9..467c6de 100644 --- a/test/AspNetCoreModule.Test/FunctionalTest.cs +++ b/test/AspNetCoreModule.Test/FunctionalTest.cs @@ -426,7 +426,8 @@ namespace AspNetCoreModule.Test [OSSkipCondition(OperatingSystems.MacOSX)] [OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, SkipReason = "IIS does not support Websocket on Win7")] [InlineData(IISConfigUtility.AppPoolBitness.enable32Bit, "ab")] - [InlineData(IISConfigUtility.AppPoolBitness.noChange, "abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789")] + //[InlineData(IISConfigUtility.AppPoolBitness.noChange, "abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789")] + [InlineData(IISConfigUtility.AppPoolBitness.noChange, "abcdefghijklmnopqrstuvwxyz0123456789")] public Task V21_WebSocketRecycledWithConfigChangeTest(IISConfigUtility.AppPoolBitness appPoolBitness, string testData) { return DoWebSocketRecycledWithConfigChangeTest(appPoolBitness, testData); diff --git a/test/AspNetCoreModule.Test/FunctionalTestHelper.cs b/test/AspNetCoreModule.Test/FunctionalTestHelper.cs index 9359886..585face 100644 --- a/test/AspNetCoreModule.Test/FunctionalTestHelper.cs +++ b/test/AspNetCoreModule.Test/FunctionalTestHelper.cs @@ -1854,7 +1854,7 @@ namespace AspNetCoreModule.Test Thread.Sleep(500); VerifySendingWebSocketData(websocketClient, testData); - Thread.Sleep(500); + Thread.Sleep(1000); using (var iisConfig = new IISConfigUtility(testSite.IisServerType, testSite.IisExpressConfigPath)) { @@ -1873,6 +1873,9 @@ namespace AspNetCoreModule.Test Assert.Contains("ClosingFromServer", websocketClient.Connection.DataReceived[lastIndex].TextData); testSite.VerifyWorkerProcessRecycledUnderInprocessMode(recycledProcessId); + + Thread.Sleep(500); + await SendReceive(testSite.AspNetCoreApp.GetUri(), expectedResponseBody: "Running"); } }