com.google.testing.threadtester
Class TestTimeoutException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.google.testing.threadtester.TestTimeoutException
All Implemented Interfaces:
Serializable

public class TestTimeoutException
extends Exception

Exception throw by the test framework if a test operation does not complete during the time specified by Options.timeout. A TestTimoutException is associated with a given thread. This is the thread that was performing the operation that timed out, not the thread in which the exception is thrown. For example, if a call to TestThread.finish() throws a TestTimeoutException, the associated thread will be the TestThread that failed to finish, not the thread that called finish().

Author:
alasdair.mackintosh@gmail.com (Alasdair Mackintosh)
See Also:
TestThread.finish(), Breakpoint.await(), Stepper.step(), Serialized Form

Constructor Summary
TestTimeoutException(String message, Thread thread)
          Creates a new exception after a timeout in the given thread, with the given message.
TestTimeoutException(Thread thread)
          Creates a new exception after a timeout in the given thread.
 
Method Summary
 Thread getThread()
          Gets the thread that was executing the operation that timed out.
 
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

TestTimeoutException

public TestTimeoutException(Thread thread)
Creates a new exception after a timeout in the given thread.


TestTimeoutException

public TestTimeoutException(String message,
                            Thread thread)
Creates a new exception after a timeout in the given thread, with the given message.

Method Detail

getThread

public Thread getThread()
Gets the thread that was executing the operation that timed out.



Copyright © 2013. All Rights Reserved.