views:

478

answers:

1

I'm running some unit tests for a large VB.Net application I help maintain and am running into problems with tests timing out.

The test run is set up so that there's no timeout limit on the overall test run, but a limit of 2 minutes per individual test. However, a couple of the tests take a lot longer than this to run, so we tried adding the timeout attribute to the test's declaration, i.e

<TestMethod(), Timeout(15 * 60 * 1000)> Public Sub DoSomething()

for a 15 minute timeout. However, the 2 minute timeout set in the test run properties seems to be taking precedence, even though it says that the timeout attribute should override it.

Is there something I'm missing?

Thanks.

+3  A: 

Replace the timeout expression with the value, i.e. Timeout(900000).

muratgu