Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UnitTest keeps hanging in Visual Studio 2010

I recently run into problems when running all my unit tests at once.

I can debug them and run my tests seperate without problems, but when running them all together, the test-run keeps hanging half way through.

This happens:

  1. "Run all tests in Solution"
  2. The first tests parses without problem (slower then usual though)
  3. At some point it gets stuck. Nothing fails, no exceptions, VS just stops running the pending tests.
  4. When stopping the test-run it gets stuck again, and I need to restart VS to abort the test-run.

Normally I would expect a bug in my code, but I haven't made any changes to the code beeing testet since last succesful test-run. The only thing I did was run Performance Wizard - Cuncurrency profiling.

It always stops the same place, when removing some tests from the run it stops a new place (still without actually entering any leftover tests).

I have no clue what is causing this. But seems like I'm having problem with a VS setting rather then a code Error.

Any suggestions? Do Performance Wizard change any settings that might have influenced the way test should be run?

System details: Windows 7 Ultimate 64-bit, Visual Studio 10 Premium

like image 596
Tinia Avatar asked Dec 28 '25 14:12

Tinia


1 Answers

This sounds like a concurrency issue. It seems that one test changes the testenvironment in such a way that another test runs into a deadlock. When you remove some tests, the test run order is changed and some other tests get stuck.

So I would look for a concurrency issue regarding your test environment/externall dependencies.

like image 125
PVitt Avatar answered Dec 31 '25 17:12

PVitt



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!