MSTests timeout in TeamCity

Completed

Recently, I started getting Timeouts when running MSTest as part of my TeamCity build process.  These tests used to run without issue.  If I run the same command from the command prompt the tests also Timeout.  However, if I move the release build from the teamcity folder (C:\TeamCity\buildAgent\work\e3d84e22f4f72276\RtAPI.Tests\bin\Release\) and put it on the build servers desktop (C:\Users\rtadmin\Desktop\Testing) and run mstest with the new path from the command line, the test run without issue.  I have tried rebooting and upgrading to the latest TeamCity version 10.0.4 (build 42538).  This issue seems to be related to tests that access the database, but I have tested the database connection from the server.  I have other projects that run database tests fine through TeamCity, I am not sure why this project would be any different.

Any idea why these tests would timeout when in the Teamcity directory or how to fix it? 

Thanks,

Josh

1
1 comment
Avatar
Permanently deleted user

After further investigation, it seems the issue had to do with various nuget packages I had installed.  I diagnosed the issue by opening Visual Studio on the server and running the tests from there.  At that point I got errors saying references could not be found.  Once I removed the references\nuget packages and added them back the tests began to work.

I also had an issue with the TeamCity nuget server timing out.  I overcame this issue by running the nuget command from the build log on the server.  Eventually, TeamCity handled the request and cached the nuget packages on the server.  Once the nuget packages were cached the project built properly.  This is probably due to server resources being low.

0

Please sign in to leave a comment.