diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2009-01-17 19:56:48 -0800 |
---|---|---|
committer | Andrew <andrewarnott@gmail.com> | 2009-01-17 19:56:48 -0800 |
commit | d43cb48e94fdb20cff7a762b48de0b3bddb49e8c (patch) | |
tree | 99e2a48325a340a721c11b94d0ad23f954a24db3 | |
parent | c9aa4d2342bbd1694213f876e44240d13cb2e220 (diff) | |
download | DotNetOpenAuth-d43cb48e94fdb20cff7a762b48de0b3bddb49e8c.zip DotNetOpenAuth-d43cb48e94fdb20cff7a762b48de0b3bddb49e8c.tar.gz DotNetOpenAuth-d43cb48e94fdb20cff7a762b48de0b3bddb49e8c.tar.bz2 |
Added better fault tolerance to test Coordinator.
-rw-r--r-- | src/DotNetOpenAuth.Test/CoordinatorBase.cs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/DotNetOpenAuth.Test/CoordinatorBase.cs b/src/DotNetOpenAuth.Test/CoordinatorBase.cs index fdb2991..11172b7 100644 --- a/src/DotNetOpenAuth.Test/CoordinatorBase.cs +++ b/src/DotNetOpenAuth.Test/CoordinatorBase.cs @@ -67,6 +67,15 @@ namespace DotNetOpenAuth.Test { party1Thread.Abort(); party2Thread.Abort(); throw; + } catch (ThreadStartException ex) { + if (ex.InnerException is ThreadAbortException) { + // if party1Thread threw an exception + // (which may even have been intentional for the test) + // before party2Thread even started, then this exception + // can be thrown, and should be ignored. + } else { + throw; + } } // Use the failing reason of a failing sub-thread as our reason, if anything failed. |