1

Resolved

Elapsed time is wrong for timeouts

description

Using the VS runner (with VS 2012/Win 8/latest xUnit as of today):
    [Fact(Timeout=1000)]
    public void TestSomething()
    {
        Thread.Sleep(1500);
    }
The test fails because it exceeds the timeout, but Test Explorer says:
Message: Test execution time exceeded: 1000ms
Elapsed time: 16 min

The 16 min is wrong. I think it's correctly treating the Timeout value as milliseconds for purposes of timeout enforcement and the value displayed in message, but incorrectly treating the Timeout value as seconds for purposes of the Elapsed time.

comments

BradWilson wrote Nov 1, 2012 at 3:05 AM