From e3e9b120b35f4175f5410d50204243c7de15ba4f Mon Sep 17 00:00:00 2001 From: Pavel Krymets Date: Tue, 5 Feb 2019 09:20:45 -0800 Subject: [PATCH] Reenable tests that are though to be fixed (#7254) ReaderThrowsCancelledException might be fixed by https://github.com/aspnet/AspNetCore/pull/6862 DoesNotStartIfDisabled was fixed by https://github.com/aspnet/AspNetCore/pull/7068 Also remove some extreme diagnostic features added in https://github.com/aspnet/AspNetCore/pull/7068 --- .../Inprocess/StartupTests.cs | 2 +- .../test/IIS.Tests/ClientDisconnectTests.cs | 2 +- .../src/IISExpressDeployer.cs | 20 ------------------- 3 files changed, 2 insertions(+), 22 deletions(-) diff --git a/src/Servers/IIS/IIS/test/Common.FunctionalTests/Inprocess/StartupTests.cs b/src/Servers/IIS/IIS/test/Common.FunctionalTests/Inprocess/StartupTests.cs index 5a8dadaf17..0390b5b3df 100644 --- a/src/Servers/IIS/IIS/test/Common.FunctionalTests/Inprocess/StartupTests.cs +++ b/src/Servers/IIS/IIS/test/Common.FunctionalTests/Inprocess/StartupTests.cs @@ -143,7 +143,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests } } - [ConditionalFact(Skip = "https://github.com/aspnet/AspNetCore/issues/6615")] + [ConditionalFact] [RequiresIIS(IISCapability.PoolEnvironmentVariables)] public async Task DoesNotStartIfDisabled() { diff --git a/src/Servers/IIS/IIS/test/IIS.Tests/ClientDisconnectTests.cs b/src/Servers/IIS/IIS/test/IIS.Tests/ClientDisconnectTests.cs index 5f0ccd97d7..dbe562aa7c 100644 --- a/src/Servers/IIS/IIS/test/IIS.Tests/ClientDisconnectTests.cs +++ b/src/Servers/IIS/IIS/test/IIS.Tests/ClientDisconnectTests.cs @@ -171,7 +171,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests } } - [ConditionalFact(Skip = "https://github.com/aspnet/AspNetCore/issues/6595")] + [ConditionalFact] public async Task ReaderThrowsCancelledException() { var requestStartedCompletionSource = CreateTaskCompletionSource(); diff --git a/src/Servers/IIS/IntegrationTesting.IIS/src/IISExpressDeployer.cs b/src/Servers/IIS/IntegrationTesting.IIS/src/IISExpressDeployer.cs index f1279fac24..4e73280fd5 100644 --- a/src/Servers/IIS/IntegrationTesting.IIS/src/IISExpressDeployer.cs +++ b/src/Servers/IIS/IntegrationTesting.IIS/src/IISExpressDeployer.cs @@ -456,9 +456,6 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting.IIS internal static extern bool EnumWindows(EnumWindowProc callback, IntPtr lParam); [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)] internal static extern int GetClassName(IntPtr hWnd, StringBuilder lpClassName,int nMaxCount); - [DllImport("kernel32.dll")] - internal static extern IntPtr CreateRemoteThread(IntPtr hProcess, IntPtr lpThreadAttributes, uint dwStackSize, IntPtr lpStartAddress, IntPtr lpParameter, uint dwCreationFlags, IntPtr lpThreadId); - } private void SendStopMessageToProcess(int pid) @@ -520,27 +517,10 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting.IIS if (!found) { - TriggerCrash(pid); - throw new InvalidOperationException($"Unable to find main window for process {pid}"); } } - private void TriggerCrash(int pid) - { - try - { - Logger.LogInformation($"Trying to crash the process {pid}"); - var process = Process.GetProcessById(pid); - // Calling CreateRemoteThread as 0x1 as thread function pointer should cause a crash - WindowsNativeMethods.CreateRemoteThread(process.Handle, IntPtr.Zero, 0, (IntPtr)1, IntPtr.Zero, 0, IntPtr.Zero); - } - catch (Exception e) - { - Logger.LogInformation(e, "Exception while trying to crash the process"); - } - } - private void GracefullyShutdownProcess(Process hostProcess) { if (hostProcess != null && !hostProcess.HasExited)