Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

nUnit Test Adapter 10 second limit: long-running tests in nUnit

I have some tests in nUnit that call an external program that sometimes takes more than 10 seconds to finish. This works fine when I run them in nUnit's "Unit Test Sessions" panel. However, when I use the test adapter (which has the benefits of more through error output and automatic test discovery), I get the following error:

The request has taken more than 10 seconds to respond, aborting it.
Exception has been thrown by the target of an invocation.

Is there any way I can extend this time limit for my tests? Is this an issue with the adapter, or with Visual Studio itself?

Edit: To clarify, I know that mocking out time-consuming functionality is the proper thing to do. Right now, though, it's not worth the time (in my estimation) that it would take to refactor my unit tests.

like image 722
jtpereyda Avatar asked Nov 01 '22 21:11

jtpereyda


1 Answers

It has nothing to do with VS, as the Resharper is able to run tests well exceeding 10 seconds. This is most likely a limitation of the adapter.

like image 127
Low Flying Pelican Avatar answered Nov 15 '22 05:11

Low Flying Pelican