Timeout test fails under Mono on Linux
Bug #641423 reported by
Charlie Poole
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
NUnit V2 |
Fix Released
|
Medium
|
Charlie Poole |
Bug Description
The test NUnit.Core.
Related branches
Changed in nunitv2: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
status: | Confirmed → In Progress |
assignee: | nobody → Charlie Poole (charlie.poole) |
Changed in nunitv2: | |
status: | In Progress → Fix Committed |
milestone: | none → 2.5.8 |
Changed in nunitv2: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
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.