private int determineTimeout(TestCandidate c) {
Integer timeout = null;
Timeout timeoutAnn = c.instanceProvider.getTestClass().getAnnotation(Timeout.class);
if (timeoutAnn != null) {
timeout = (int) Math.min(Integer.MAX_VALUE, timeoutAnn.millis());
}
// @Test annotation timeout value.
Test testAnn = c.method.getAnnotation(Test.class);
if (testAnn != null && testAnn.timeout() > 0) {