org.junit.runners.model
Class TestTimedOutException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.junit.runners.model.TestTimedOutException
All Implemented Interfaces:
Serializable

public class TestTimedOutException
extends Exception

Exception thrown when a test fails on timeout.

Since:
4.12
See Also:
Serialized Form

Constructor Summary
TestTimedOutException(long timeout, TimeUnit timeUnit)
          Creates exception with a standard message "test timed out after [timeout] [timeUnit]"
 
Method Summary
 long getTimeout()
          Gets the time passed before the test was interrupted
 TimeUnit getTimeUnit()
          Gets the time unit for the timeout value
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TestTimedOutException

public TestTimedOutException(long timeout,
                             TimeUnit timeUnit)
Creates exception with a standard message "test timed out after [timeout] [timeUnit]"

Parameters:
timeout - the amount of time passed before the test was interrupted
timeUnit - the time unit for the timeout value
Method Detail

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



Copyright © 2002–2021 JUnit. All rights reserved.