diff options
author | krk <keremkat@gmail.com> | 2015-06-05 23:56:49 +0300 |
---|---|---|
committer | krk <keremkat@gmail.com> | 2015-06-06 12:51:25 +0300 |
commit | 2b004ddb42a8826cd974860c0d2a64d4243b9bad (patch) | |
tree | 587c75c0ca31a115173997fbe0a63810ff583e70 | |
parent | 79aa1e8993050e6c3c445abb67aa6947efba9890 (diff) | |
download | coreclr-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
-rw-r--r-- | tests/src/Common/Coreclr.TestWrapper/CoreclrTestWrapperLib.cs | 19 |
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 { |