junit-team/junit — pull request #149 by awreece (2013-06-05 01:20:09+00:00)
Title: Timeout non-deterministic

The timeout argument for the @Test annotation is non-deterministic.

It times out after waiting a certain amount of clock time, rather than CPU time - this means the success / failure of the test will depend on the current state of the machine ( what other processes are running, etc ).

This has a relatively simple fix: use ThreadMXBean to figure out the CPU time taken. Only org.junit.internal.runners.statements.FailOnTimeout.java would need to be modified.