title: How to make a TeamCity build fail (timeout) if it takes too long?
body: <p>How do we put a timeout on a TeamCity build?</p>
  
  <p>We have a TeamCity build which runs some integration tests. These tests read/write data to a database and sometimes this is very slow (why it is slow is another open quesiton).</p>
  
  <p>We currently have timeouts in our integration tests to check that e.g. the data has been written within 30 seconds, but these tests are randomly failing during periods of heavy use.</p>
  
  <p>If we removed the timeouts from the tests, we would want to fail the build only if the entire run took more than some much larger timeout.</p>
  
  <p>But I can't see how to do that.</p>