Change ClassCleanup timeout

I have seen few people writing a lot of code in their class cleanup and then complaining that the clean-up is timing out and how they can increase this timeout. To do this, I suggest them the following steps: -

  • Ensure that your class cleanup is indeed timing out. To do this, please check whether you are observing following error in the application event logs of the machine where you are running tests.

QTAgent32.exe, PID 18308, Thread 29) AgentObject: Cleanup: Timeout reached in cleaning up the agent.

  • Once you have ensured that it indeed is the problem, try changing the timeout by specifying the AgentCleanupTimeout property in the configuration file of the client which is running the test like mstest.exe.config


  • Restart the client to ensure that the configuration gets picked up and run the tests again. It should work.


Enjoy !!