Paul McKenzie
Paul McKenzie

Reputation: 20096

How to make a TeamCity build fail (timeout) if it takes too long?

How do we put a timeout on a TeamCity build?

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).

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.

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.

But I can't see how to do that.

Upvotes: 33

Views: 17033

Answers (2)

Major
Major

Reputation: 6668

In TeamCity v.9 and v.10 you should find it under the "Failure Conditions". See:

enter image description here

Upvotes: 25

stack72
stack72

Reputation: 8278

On the first page of the build setup you will find the field highlights in my screenie - use thatenter image description here

Upvotes: 45

Related Questions