类 TestTimedOutException
- java.lang.Object
- java.lang.Throwable
- java.lang.Exception
- org.junit.runners.model.TestTimedOutException
- 所有已实现的接口:
Serializable
public class TestTimedOutException extends Exception
Exception thrown when a test fails on timeout.- 从以下版本开始:
- 4.12
- 另请参阅:
- 序列化表格
构造器概要
构造器 构造器 说明 TestTimedOutException(long timeout, TimeUnit timeUnit)
Creates exception with a standard message "test timed out after [timeout] [timeUnit]"
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 long
getTimeout()
Gets the time passed before the test was interruptedTimeUnit
getTimeUnit()
Gets the time unit for the timeout value
构造器详细资料
TestTimedOutException
public TestTimedOutException(long timeout, TimeUnit timeUnit)
Creates exception with a standard message "test timed out after [timeout] [timeUnit]"- 参数:
timeout
- the amount of time passed before the test was interruptedtimeUnit
- the time unit for the timeout value
方法详细资料
getTimeout
public long getTimeout()
Gets the time passed before the test was interrupted
getTimeUnit
public TimeUnit getTimeUnit()
Gets the time unit for the timeout value