Browse Source

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.

la-knuth
Christoph Ruegg 17 years ago
parent
commit
de523740e1
  1. 4
      src/UnitTests/ThreadingTests/ParallelForTests.cs

4
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;

Loading…
Cancel
Save