summaryrefslogtreecommitdiff
path: root/tests/src/Common/Coreclr.TestWrapper
diff options
context:
space:
mode:
authorkrk <keremkat@gmail.com>2015-06-05 23:56:49 +0300
committerkrk <keremkat@gmail.com>2015-06-06 12:51:25 +0300
commit2b004ddb42a8826cd974860c0d2a64d4243b9bad (patch)
tree587c75c0ca31a115173997fbe0a63810ff583e70 /tests/src/Common/Coreclr.TestWrapper
parent79aa1e8993050e6c3c445abb67aa6947efba9890 (diff)
downloadcoreclr-2b004ddb42a8826cd974860c0d2a64d4243b9bad.tar.gz
coreclr-2b004ddb42a8826cd974860c0d2a64d4243b9bad.tar.bz2
coreclr-2b004ddb42a8826cd974860c0d2a64d4243b9bad.zip
ObjectDisposedException handled in test wrapper.
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
Diffstat (limited to 'tests/src/Common/Coreclr.TestWrapper')
-rw-r--r--tests/src/Common/Coreclr.TestWrapper/CoreclrTestWrapperLib.cs19
1 files changed, 17 insertions, 2 deletions
diff --git a/tests/src/Common/Coreclr.TestWrapper/CoreclrTestWrapperLib.cs b/tests/src/Common/Coreclr.TestWrapper/CoreclrTestWrapperLib.cs
index 918bbac42f..ad828e895f 100644
--- a/tests/src/Common/Coreclr.TestWrapper/CoreclrTestWrapperLib.cs
+++ b/tests/src/Common/Coreclr.TestWrapper/CoreclrTestWrapperLib.cs
@@ -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;
@@ -38,7 +39,14 @@ namespace CoreclrTestLib
{
if (e.Data == null)
{
- outputWaitHandle.Set();
+ try
+ {
+ outputWaitHandle.Set();
+ }
+ catch (ObjectDisposedException)
+ {
+ // Noop for access after timeout.
+ }
}
else
{
@@ -49,7 +57,14 @@ namespace CoreclrTestLib
{
if (e.Data == null)
{
- errorWaitHandle.Set();
+ try
+ {
+ errorWaitHandle.Set();
+ }
+ catch (ObjectDisposedException)
+ {
+ // Noop for access after timeout.
+ }
}
else
{