Skip to content

Commit

Permalink
ObjectDisposedException handled in test wrapper.
Browse files Browse the repository at this point in the history
Process output and error event handlers are being called after a
timeout has expired but the process has not exited.

* ObjectDisposedException is handled around AutoResetEvent.Set() method
  calls in CoreclrTestWrapperLib class.

Fix #1039
  • Loading branch information
krk committed Jun 6, 2015
1 parent 79aa1e8 commit 2b004dd
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions tests/src/Common/Coreclr.TestWrapper/CoreclrTestWrapperLib.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
Expand Down Expand Up @@ -38,7 +39,14 @@ public int RunTest(string cmdLine, string outputfile, string errorfile)
{
if (e.Data == null)
{
outputWaitHandle.Set();
try
{
outputWaitHandle.Set();
}
catch (ObjectDisposedException)
{
// Noop for access after timeout.
}
}
else
{
Expand All @@ -49,7 +57,14 @@ public int RunTest(string cmdLine, string outputfile, string errorfile)
{
if (e.Data == null)
{
errorWaitHandle.Set();
try
{
errorWaitHandle.Set();
}
catch (ObjectDisposedException)
{
// Noop for access after timeout.
}
}
else
{
Expand Down

0 comments on commit 2b004dd

Please sign in to comment.