org.jboss.test.util.test.concurrent
Class ThreadPoolTaskUnitTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.jboss.test.util.test.concurrent.ThreadPoolTaskUnitTestCase
All Implemented Interfaces:
junit.framework.Test

public class ThreadPoolTaskUnitTestCase
extends junit.framework.TestCase

Tests of thread pool with Tasks added to the pool

Version:
$Revision: 2787 $
Author:
Adrian.Brock, Scott.Stark@jboss.org
See Also:
ThreadPool

Nested Class Summary
 class ThreadPoolTaskUnitTestCase.Stats
           
 class ThreadPoolTaskUnitTestCase.TestTask
          Test task
 
Constructor Summary
ThreadPoolTaskUnitTestCase(String name)
          Create a new ThreadPoolTaskUnitTestCase
 
Method Summary
 HashSet makeExpected(Object[] expected)
          Make the expected result
 void saveRunnableThreadName(String data, String name)
          Save the thread name
protected  void setUp()
           
protected  void tearDown()
           
 void testBasic()
           
 void testCompleteTimeout()
           
 void testCompleteTimeoutWithSpinLoop()
           
 void testMaximumPool()
           
 void testMaximumQueue()
           
 void testMultipleBasic()
           
 void testMultiplePooling()
           
 void testSimplePooling()
           
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ThreadPoolTaskUnitTestCase

public ThreadPoolTaskUnitTestCase(String name)
Create a new ThreadPoolTaskUnitTestCase

Parameters:
name - the test to run
Method Detail

setUp

protected void setUp()
              throws Exception
Overrides:
setUp in class junit.framework.TestCase
Throws:
Exception

tearDown

protected void tearDown()
                 throws Exception
Overrides:
tearDown in class junit.framework.TestCase
Throws:
Exception

testBasic

public void testBasic()
               throws Exception
Throws:
Exception

testMultipleBasic

public void testMultipleBasic()
                       throws Exception
Throws:
Exception

testSimplePooling

public void testSimplePooling()
                       throws Exception
Throws:
Exception

testMultiplePooling

public void testMultiplePooling()
                         throws Exception
Throws:
Exception

testMaximumPool

public void testMaximumPool()
                     throws Exception
Throws:
Exception

testMaximumQueue

public void testMaximumQueue()
                      throws Exception
Throws:
Exception

testCompleteTimeout

public void testCompleteTimeout()
                         throws Exception
Throws:
Exception

testCompleteTimeoutWithSpinLoop

public void testCompleteTimeoutWithSpinLoop()
                                     throws Exception
Throws:
Exception

saveRunnableThreadName

public void saveRunnableThreadName(String data,
                                   String name)
Save the thread name

Parameters:
data - the test data
name - the thread name

makeExpected

public HashSet makeExpected(Object[] expected)
Make the expected result

Parameters:
expected - the results as an object array
Returns:
the expected result


Copyright © 2009 JBoss Inc.. All Rights Reserved.