org.objectweb.cjdbc.scenario.standalone.connection
Class RandomWaitPoolConnectionManagerTest

java.lang.Object
  extended byTestCase
      extended byorg.objectweb.cjdbc.scenario.templates.NoTemplate
          extended byorg.objectweb.cjdbc.scenario.standalone.connection.RandomWaitPoolConnectionManagerTest

public class RandomWaitPoolConnectionManagerTest
extends NoTemplate

RandomWaitPoolConnectionManager test class.

Author:
Mathieu Peltier
See Also:
RandomWaitPoolConnectionManager, Serialized Form

Field Summary
private  MockDriver mockDriver
          Fake driver.
private  RandomWaitPoolConnectionManager pool
          Random wait connection manager pool to test.
 
Fields inherited from class org.objectweb.cjdbc.scenario.templates.NoTemplate
logger, TEXT_DIR
 
Constructor Summary
RandomWaitPoolConnectionManagerTest()
           
 
Method Summary
private  void initializePool(int poolSize, int timeout)
          Creates and initializes a RandomWaitoolConnectionManager.
static void main(java.lang.String[] args)
          Starts a new test
protected  void setUp()
           
static Test suite()
          Builds a new TestSuite
protected  void tearDown()
           
 void testGetAndReleaseConnection()
           
 
Methods inherited from class org.objectweb.cjdbc.scenario.templates.NoTemplate
getTextPath, getUserDir
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mockDriver

private MockDriver mockDriver
Fake driver.


pool

private RandomWaitPoolConnectionManager pool
Random wait connection manager pool to test.

Constructor Detail

RandomWaitPoolConnectionManagerTest

public RandomWaitPoolConnectionManagerTest()
Method Detail

suite

public static Test suite()
Builds a new TestSuite

Returns:
the TestSuite

main

public static void main(java.lang.String[] args)
Starts a new test

Parameters:
args - test parameters

setUp

protected void setUp()
See Also:
junit.framework.TestCase#setUp()

tearDown

protected void tearDown()
See Also:
junit.framework.TestCase#tearDown()

initializePool

private void initializePool(int poolSize,
                            int timeout)
Creates and initializes a RandomWaitoolConnectionManager.

Parameters:
poolSize - pool size.
timeout - timeout.

testGetAndReleaseConnection

public void testGetAndReleaseConnection()
                                 throws java.lang.Exception
Throws:
java.lang.Exception - if an error occurs
See Also:
RandomWaitPoolConnectionManager.releaseConnection(Connection), RandomWaitPoolConnectionManager.getConnection()


Copyright © 2002, 2005 - ObjectWeb Consortium - All Rights Reserved.