net.sourceforge.groboutils.junit.v1
Class MultiThreadedTestRunner

java.lang.Object
  |
  +--net.sourceforge.groboutils.junit.v1.MultiThreadedTestRunner

public class MultiThreadedTestRunner
extends java.lang.Object

A framework which allows for an array of tests to be run asynchronously. TestCases should reference this class in a test method.

Since:
Jan 14, 2002
Version:
$Date: 2003/02/10 22:52:19 $
Author:
Matt Albrecht groboclown@users.sourceforge.net

Nested Class Summary
protected static class MultiThreadedTestRunner.JDK11Interrupt
           
protected static class MultiThreadedTestRunner.JDK12Interrupt
           
protected static interface MultiThreadedTestRunner.ThreadGroupInterrupt
           
 
Constructor Summary
MultiThreadedTestRunner(TestRunnable[] tr)
           
 
Method Summary
protected static MultiThreadedTestRunner.ThreadGroupInterrupt discoverInterruptor()
           
 void runTestRunnables()
          Run each test given in a separate thread.
 void runTestRunnables(long maxTime)
          Run each test given in a separate thread.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiThreadedTestRunner

public MultiThreadedTestRunner(TestRunnable[] tr)
Method Detail

runTestRunnables

public void runTestRunnables()
                      throws java.lang.Throwable
Run each test given in a separate thread. Wait for each thread to finish running, then return.

Throws:
java.lang.Throwable - thrown on a test run if a threaded task throws an exception.

runTestRunnables

public void runTestRunnables(long maxTime)
                      throws java.lang.Throwable
Run each test given in a separate thread. Wait for each thread to finish running, then return.

Parameters:
maxTime - the maximum amount of milliseconds to wait for the tests to run. If the time is <= 0, then the tests will run until they are complete. Otherwise, any threads that don't complete by the given number of milliseconds will be killed, and a failure will be thrown.
Throws:
java.lang.Throwable - thrown from the underlying tests if they happen to cause an error.

discoverInterruptor

protected static MultiThreadedTestRunner.ThreadGroupInterrupt discoverInterruptor()


Copyright © 2001-2003 by The GroboUtils Project