|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjava.lang.ThreadGroup
com.clarkware.junitperf.ThreadedTestGroup
public class ThreadedTestGroup
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.
| Constructor Summary | |
|---|---|
ThreadedTestGroup(Test test)
Constructs a ThreadedTestGroup for the
specified test. |
|
| Method Summary | |
|---|---|
void |
setTestResult(TestResult result)
Sets the current test result. |
void |
uncaughtException(java.lang.Thread t,
java.lang.Throwable e)
Called when a thread in this thread group stops because of an uncaught exception. |
| Methods inherited from class java.lang.ThreadGroup |
|---|
activeCount, activeGroupCount, allowThreadSuspension, checkAccess, destroy, enumerate, enumerate, enumerate, enumerate, getMaxPriority, getName, getParent, interrupt, isDaemon, isDestroyed, list, parentOf, resume, setDaemon, setMaxPriority, stop, suspend, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ThreadedTestGroup(Test test)
ThreadedTestGroup for the
specified test.
test - Current test.| Method Detail |
|---|
public void setTestResult(TestResult result)
result - Test result.
public void uncaughtException(java.lang.Thread t,
java.lang.Throwable e)
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.
uncaughtException in interface java.lang.Thread.UncaughtExceptionHandleruncaughtException in class java.lang.ThreadGroupt - Originating thread.e - Uncaught exception.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||