← Back to team overview

nunit-core team mailing list archive

[Bug 641423] Re: Timeout test fails under Mono on Linux

 

This bug uncovers a race condition in the TestThread class. Both the
original thread and the test thread update the TestResult that is passed
into TestThread. Under Windows, the originating thread was always the
last thread to update it, which is the desired behavior. But under
Linux, the test thread is making the last update, leading to an
incorrect result.

Locking won't help here, since the updates would eventually  be made
when the lock is released.

The correct solution is for the test thread to use an entirely separate
result, which is read but not written by the original thread.

-- 
Timeout test fails under Mono on Linux
https://bugs.launchpad.net/bugs/641423
You received this bug notification because you are a member of NUnit
Developers, which is subscribed to NUnit V2.

Status in NUnit V2 Test Framework: In Progress

Bug description:
The test NUnit.Core.Tests.ThreadingTests.TimeoutCanBeSetOnTestFixture fails under Mono on Linux. The individual test should return a Failure result but returns Cancelled. It works correctly on Windows.





References