Reputation: 271
Some of my test classes take longer than a minute to run and I can't complete them because it cancels it saying:
Canceling test run: test run timeout of 60000 milliseconds exceeded.
Is this configurable somewhere? I'm using the latest versions of:
Upvotes: 7
Views: 4769
Reputation: 378
NUnit provides a Timeout attribute.
[Test, Timeout(2000)]
public void PotentiallyLongRunningTest()
{
/* ... */
}
Upvotes: 0
Reputation: 47987
VS Test, which is used by Visual Studio for Mac to run the .NET Core Test project tests, supports passing a run settings file on the command line. This allows you to set a timeout.
Looking at the Visual Studio for Mac source code it seems this value of 60 seconds is unfortunately hard coded.
Visual Studio for Mac generates its own run settings which it passes to the VS Test runner.
You may want to report this on the Visual Studio for Mac developer community forum or open a GitHub issue so you can be notified when it gets fixed.
Upvotes: 9