summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.Test
diff options
context:
space:
mode:
Diffstat (limited to 'src/DotNetOpenAuth.Test')
-rw-r--r--src/DotNetOpenAuth.Test/CoordinatorBase.cs14
-rw-r--r--src/DotNetOpenAuth.Test/OpenId/AssociationHandshakeTests.cs5
2 files changed, 13 insertions, 6 deletions
diff --git a/src/DotNetOpenAuth.Test/CoordinatorBase.cs b/src/DotNetOpenAuth.Test/CoordinatorBase.cs
index 4463dde..8efd46d 100644
--- a/src/DotNetOpenAuth.Test/CoordinatorBase.cs
+++ b/src/DotNetOpenAuth.Test/CoordinatorBase.cs
@@ -39,12 +39,14 @@ namespace DotNetOpenAuth.Test {
action();
} catch (Exception ex) {
// We may be the second thread in an ThreadAbortException, so check the "flag"
- if (failingException == null) {
- failingException = ex;
- if (Thread.CurrentThread == party1Thread) {
- party2Thread.Abort();
- } else {
- party1Thread.Abort();
+ lock (this) {
+ if (failingException == null || (failingException is ThreadAbortException && !(ex is ThreadAbortException))) {
+ failingException = ex;
+ if (Thread.CurrentThread == party1Thread) {
+ party2Thread.Abort();
+ } else {
+ party1Thread.Abort();
+ }
}
}
}
diff --git a/src/DotNetOpenAuth.Test/OpenId/AssociationHandshakeTests.cs b/src/DotNetOpenAuth.Test/OpenId/AssociationHandshakeTests.cs
index e411ecb..24b54cf 100644
--- a/src/DotNetOpenAuth.Test/OpenId/AssociationHandshakeTests.cs
+++ b/src/DotNetOpenAuth.Test/OpenId/AssociationHandshakeTests.cs
@@ -13,6 +13,11 @@ namespace DotNetOpenAuth.Test.OpenId {
[TestClass]
public class AssociationHandshakeTests : OpenIdTestBase {
+ [TestInitialize]
+ public override void SetUp() {
+ base.SetUp();
+ }
+
[TestMethod]
public void DHv2() {
var opDescription = new ProviderEndpointDescription(new Uri("http://host"), Protocol.V20);