未验证 提交 7db44848 编写于 作者: S Sam Harwell 提交者: GitHub

Merge pull request #30431 from sharwell/handle-cleanup-failures

Handle failures during integration test remoting cleanup
......@@ -185,12 +185,22 @@ public void Close(bool exitHostProcess = true)
{
if (!IsRunning)
{
CloseRemotingService(allowInProcCalls: false);
return;
}
CleanUp();
try
{
CleanUp();
}
catch
{
// A cleanup failure occurred, but we still need to close the communication channel from this side
CloseRemotingService(allowInProcCalls: false);
throw;
}
CloseRemotingService();
CloseRemotingService(allowInProcCalls: true);
if (exitHostProcess)
{
......@@ -204,11 +214,14 @@ private void CloseHostProcess()
IntegrationHelper.KillProcess(HostProcess);
}
private void CloseRemotingService()
private void CloseRemotingService(bool allowInProcCalls)
{
try
{
StopRemoteIntegrationService();
if (allowInProcCalls)
{
StopRemoteIntegrationService();
}
}
finally
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册