Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2008 "randomly" hangs on test run

We are using VS 2008 Team System with the automated test suite, and upon running tests the test host "randomly" locks up. I actually have to kill the VSTestHost process and re-run the tests to get something to happen, otherwise all tests sit in a "pending" state.

Has anyone experience similar behavior and know of a fix? We have 3 developers here experiencing the same behavior.

like image 864
programmer Avatar asked Sep 08 '08 21:09

programmer


1 Answers

This may be related to an obscure bug that causes unit tests to hang unless the computer name is UPPERCASE. Crazy, I know - but I had this problem and the fix worked for me.

Bug report on MS Connect
Workaround on MS Connect
TFS Blog Article about this issue
HowTo edit the registry to change your computer name

The easiest approach is to tweak the registry. You need to edit two keys:

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\ComputerName\ActiveComputerName
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\ComputerName\ComputerName

Change value ComputerName to be upper case in both keys, and restart. Tests then magically work.

like image 69
Tim Long Avatar answered Nov 16 '22 02:11

Tim Long