Package org.junit.runners.model
Class TestTimedOutException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.junit.runners.model.TestTimedOutException
- All Implemented Interfaces:
Serializable
Exception thrown when a test fails on timeout.
- Since:
- 4.12
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final long
private final long
private final TimeUnit
-
Constructor Summary
ConstructorsConstructorDescriptionTestTimedOutException
(long timeout, TimeUnit timeUnit) Creates exception with a standard message "test timed out after [timeout] [timeUnit]" -
Method Summary
Modifier and TypeMethodDescriptionlong
Gets the time passed before the test was interruptedGets the time unit for the timeout valueMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
timeUnit
-
timeout
private final long timeout
-
-
Constructor Details
-
TestTimedOutException
Creates exception with a standard message "test timed out after [timeout] [timeUnit]"- Parameters:
timeout
- the amount of time passed before the test was interruptedtimeUnit
- the time unit for the timeout value
-
-
Method Details
-
getTimeout
public long getTimeout()Gets the time passed before the test was interrupted -
getTimeUnit
Gets the time unit for the timeout value
-