Class TestTimedOutException

java.lang.Object
java.lang.Throwable
java.lang.Exception
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:
  • Constructor Details

    • 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 Details

    • getTimeout

      public long getTimeout()
      Gets the time passed before the test was interrupted
    • getTimeUnit

      Gets the time unit for the timeout value