| java.lang.Object java.lang.ThreadGroup com.clarkware.junitperf.ThreadedTestGroup
ThreadedTestGroup | public class ThreadedTestGroup extends ThreadGroup (Code) | | The ThreadedTestGroup is a ThreadGroup
that catches and handles exceptions thrown by threads created
and started by ThreadedTest instances.
If a thread managed by a ThreadedTestGroup throws
an uncaught exception, then the exception is added to the current
test's results and all other threads are immediately interrupted.
author: Ervin Varga author: Mike Clark author: Clarkware Consulting, Inc. |
Constructor Summary | |
public | ThreadedTestGroup(Test test) Constructs a ThreadedTestGroup for the
specified test. |
Method Summary | |
public void | setTestResult(TestResult result) Sets the current test result. | public void | uncaughtException(Thread t, Throwable e) Called when a thread in this thread group stops because of
an uncaught exception.
If the uncaught exception is a ThreadDeath ,
then it is ignored. |
ThreadedTestGroup | public ThreadedTestGroup(Test test)(Code) | | Constructs a ThreadedTestGroup for the
specified test.
Parameters: test - Current test. |
setTestResult | public void setTestResult(TestResult result)(Code) | | Sets the current test result.
Parameters: result - Test result. |
uncaughtException | public void uncaughtException(Thread t, Throwable e)(Code) | | Called when a thread in this thread group stops because of
an uncaught exception.
If the uncaught exception is a ThreadDeath ,
then it is ignored. If the uncaught exception is an
AssertionFailedError , then a failure
is added to the current test's result. Otherwise, an
error is added to the current test's result.
Parameters: t - Originating thread. Parameters: e - Uncaught exception. |
|
|