com.google.testing.threadtester
Class TestTimeoutException
java.lang.Object
java.lang.Throwable
java.lang.Exception
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
|
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 |
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.
getThread
public Thread getThread()
- Gets the thread that was executing the operation that timed out.
Copyright © 2013. All Rights Reserved.