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
This commit is contained in:
parent
0605d162ee
commit
e3e9b120b3
|
|
@ -143,7 +143,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[ConditionalFact(Skip = "https://github.com/aspnet/AspNetCore/issues/6615")]
|
[ConditionalFact]
|
||||||
[RequiresIIS(IISCapability.PoolEnvironmentVariables)]
|
[RequiresIIS(IISCapability.PoolEnvironmentVariables)]
|
||||||
public async Task DoesNotStartIfDisabled()
|
public async Task DoesNotStartIfDisabled()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -171,7 +171,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[ConditionalFact(Skip = "https://github.com/aspnet/AspNetCore/issues/6595")]
|
[ConditionalFact]
|
||||||
public async Task ReaderThrowsCancelledException()
|
public async Task ReaderThrowsCancelledException()
|
||||||
{
|
{
|
||||||
var requestStartedCompletionSource = CreateTaskCompletionSource();
|
var requestStartedCompletionSource = CreateTaskCompletionSource();
|
||||||
|
|
|
||||||
|
|
@ -456,9 +456,6 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting.IIS
|
||||||
internal static extern bool EnumWindows(EnumWindowProc callback, IntPtr lParam);
|
internal static extern bool EnumWindows(EnumWindowProc callback, IntPtr lParam);
|
||||||
[DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)]
|
[DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)]
|
||||||
internal static extern int GetClassName(IntPtr hWnd, StringBuilder lpClassName,int nMaxCount);
|
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)
|
private void SendStopMessageToProcess(int pid)
|
||||||
|
|
@ -520,27 +517,10 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting.IIS
|
||||||
|
|
||||||
if (!found)
|
if (!found)
|
||||||
{
|
{
|
||||||
TriggerCrash(pid);
|
|
||||||
|
|
||||||
throw new InvalidOperationException($"Unable to find main window for process {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)
|
private void GracefullyShutdownProcess(Process hostProcess)
|
||||||
{
|
{
|
||||||
if (hostProcess != null && !hostProcess.HasExited)
|
if (hostProcess != null && !hostProcess.HasExited)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue