spring-framework / org.springframework.test.context.junit4.statements / SpringFailOnTimeout / <init>

<init>

SpringFailOnTimeout(next: Statement, testMethod: Method)

Construct a new SpringFailOnTimeout statement for the supplied testMethod, retrieving the configured timeout from the @Timed annotation on the supplied method.

Parameters

next - the next Statement in the execution chain

testMethod - the current test method

See Also
TestAnnotationUtils#getTimeout(Method)

SpringFailOnTimeout(next: Statement, timeout: Long)

Construct a new SpringFailOnTimeout statement for the supplied timeout.

If the supplied timeout is 0, the execution of the next statement will not be timed.

Parameters

next - the next Statement in the execution chain; never null

timeout - the configured timeout for the current test, in milliseconds; never negative