/*
 * JBoss, the OpenSource J2EE webOS
 * 
 * Distributable under LGPL license.
 * See terms of license at gnu.org.
 */
package org.jboss.test.jca.test;

import javax.resource.cci.Connection;

/**
 * Uncontended pooling stress test.
 * 
 * @author <a href="adrian@jboss.com">Adrian Brock</a>
 * @version $Revision: 1.1.2.2 $
 */
public class ContentiousRecyclingInterleavingStressTestCase extends AbstractContentiousRecyclingPoolingStressTest
{

   public void testIt() throws Throwable
   {
      tm.setTransactionTimeout(0);
      ContentiousRecyclingPoolingRunnable[] runnables = new ContentiousRecyclingPoolingRunnable[getThreadCount()];
      for (int i = 0; i < runnables.length; ++i)
      {
         runnables[i] = new ContentiousRecyclingPoolingRunnable()
         {
            public void doRun1() throws Throwable
            {
               Connection c = cf.getConnection();
               c.close();
            }
         };
      }

      runConcurrentTest(runnables, null);
   }
   
   public ContentiousRecyclingInterleavingStressTestCase(String name)
   {
      super(name);
   }
}
