From de523740e10167398598bd09eb26d744a68c5027 Mon Sep 17 00:00:00 2001 From: Christoph Ruegg Date: Tue, 2 Feb 2010 02:57:39 +0100 Subject: [PATCH] Threading UnitTests: ensure recursive parallelization resolve tests end within a fixed time, to let them fail in case the tested detection actually fails to resolve the dead-lock. --- src/UnitTests/ThreadingTests/ParallelForTests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/UnitTests/ThreadingTests/ParallelForTests.cs b/src/UnitTests/ThreadingTests/ParallelForTests.cs index 34f3a513..8d54a173 100644 --- a/src/UnitTests/ThreadingTests/ParallelForTests.cs +++ b/src/UnitTests/ThreadingTests/ParallelForTests.cs @@ -144,7 +144,7 @@ namespace MathNet.Numerics.UnitTests.ThreadingTests } } - [Test, ApartmentState(ApartmentState.MTA)] + [Test, ApartmentState(ApartmentState.MTA), Timeout(30)] public void DoesDetectAndResolveRecursiveParallelization() { int countSharedBetweenClosures = 0; @@ -309,7 +309,7 @@ namespace MathNet.Numerics.UnitTests.ThreadingTests Assert.AreEqual(count * 2, sum); } - [Test, ApartmentState(ApartmentState.MTA)] + [Test, ApartmentState(ApartmentState.MTA), Timeout(30)] public void DoesDetectAndResolveRecursiveParallelizationWithIntialAndFinally() { int countSharedBetweenClosures = 0;