public class SpringFailOnTimeout
extends org.junit.runners.model.Statement
SpringFailOnTimeout is a custom JUnit 4.5+ Statement
which adds support for Spring's @Timed annotation by throwing
an exception if the next statement in the execution chain takes more than the
specified number of milliseconds.evaluate()| Constructor and Description |
|---|
SpringFailOnTimeout(org.junit.runners.model.Statement next,
long timeout)
Constructs a new
SpringFailOnTimeout statement. |
| Modifier and Type | Method and Description |
|---|---|
void |
evaluate()
Invokes the next
statement in the execution chain
(typically an instance of
InvokeMethod
or ExpectException) and throws an exception if the next
statement takes more than the specified timeout
. |
public SpringFailOnTimeout(org.junit.runners.model.Statement next,
long timeout)
SpringFailOnTimeout statement.next - the next Statement in the execution chaintimeout - the configured timeout for the current testTimed.millis()public void evaluate()
throws Throwable
statement in the execution chain
(typically an instance of
InvokeMethod
or ExpectException) and throws an exception if the next
statement takes more than the specified timeout
.evaluate in class org.junit.runners.model.StatementThrowable