[jboss-cvs] JBossAS SVN: r65468 - in trunk/testsuite: src/main/org/jboss/test/tm/test and 1 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Sep 19 07:08:33 EDT 2007


Author: adrian at jboss.org
Date: 2007-09-19 07:08:32 -0400 (Wed, 19 Sep 2007)
New Revision: 65468

Modified:
   trunk/testsuite/imports/test-jars.xml
   trunk/testsuite/src/main/org/jboss/test/tm/test/AbstractConcurrentStressTest.java
   trunk/testsuite/src/main/org/jboss/test/tm/test/AbstractTransactionLocalStressTest.java
   trunk/testsuite/src/main/org/jboss/test/tm/test/SimpleNoLockTransactionLocalStressTestCase.java
   trunk/testsuite/src/main/org/jboss/test/tm/test/SimpleTransactionLocalStressTestCase.java
   trunk/testsuite/src/main/org/jboss/test/tm/test/SimpleUncontendedNoLockTransactionLocalStressTestCase.java
   trunk/testsuite/src/main/org/jboss/test/tm/test/SimpleUncontendedTransactionLocalStressTestCase.java
   trunk/testsuite/src/main/org/jboss/test/util/ejb/EJBTestCase.java
Log:
JBAS-4520 - Make all the org.jboss.tm tests run in the appserver

Modified: trunk/testsuite/imports/test-jars.xml
===================================================================
--- trunk/testsuite/imports/test-jars.xml	2007-09-19 11:08:07 UTC (rev 65467)
+++ trunk/testsuite/imports/test-jars.xml	2007-09-19 11:08:32 UTC (rev 65468)
@@ -185,6 +185,7 @@
    	<include name="org/jboss/test/**"/>
 	</patternset>
 	<patternset id="jboss.test.set">
+	<include name="org/jboss/test/JBossTestCase.class"/>
 	<include name="org/jboss/test/JBossTestServices.class"/>
 	<include name="org/jboss/test/AbstractTestDelegate.class"/>
 	<include name="org/jboss/test/logging/**"/>

Modified: trunk/testsuite/src/main/org/jboss/test/tm/test/AbstractConcurrentStressTest.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/tm/test/AbstractConcurrentStressTest.java	2007-09-19 11:08:07 UTC (rev 65467)
+++ trunk/testsuite/src/main/org/jboss/test/tm/test/AbstractConcurrentStressTest.java	2007-09-19 11:08:32 UTC (rev 65468)
@@ -23,7 +23,7 @@
 
 import java.util.ArrayList;
 
-import org.jboss.test.JBossTestCase;
+import org.jboss.test.util.ejb.EJBTestCase;
 
 /**
  * Abstract concurrent stress test.
@@ -31,7 +31,7 @@
  * @author <a href="adrian at jboss.com">Adrian Brock</a>
  * @version $Revision$
  */
-public class AbstractConcurrentStressTest extends JBossTestCase
+public class AbstractConcurrentStressTest extends EJBTestCase
 {
    private ArrayList done = new ArrayList();
    private int total;

Modified: trunk/testsuite/src/main/org/jboss/test/tm/test/AbstractTransactionLocalStressTest.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/tm/test/AbstractTransactionLocalStressTest.java	2007-09-19 11:08:07 UTC (rev 65467)
+++ trunk/testsuite/src/main/org/jboss/test/tm/test/AbstractTransactionLocalStressTest.java	2007-09-19 11:08:32 UTC (rev 65468)
@@ -25,7 +25,7 @@
 import javax.transaction.TransactionManager;
 
 import org.jboss.tm.TransactionLocal;
-import org.jboss.tm.TxManager;
+import org.jboss.tm.TransactionManagerLocator;
 
 /**
  * Abstract transaction local stress test.
@@ -35,8 +35,7 @@
  */
 public class AbstractTransactionLocalStressTest extends AbstractConcurrentStressTest
 {
-   //protected TransactionManager tm = TransactionManagerLocator.getInstance().locate();
-   protected TransactionManager tm = TxManager.getInstance();
+   protected TransactionManager tm = TransactionManagerLocator.locateTransactionManager();
    protected TransactionLocal local = new TransactionLocal(tm); 
    
    public abstract class ConcurrentTransactionLocalRunnable extends ConcurrentRunnable

Modified: trunk/testsuite/src/main/org/jboss/test/tm/test/SimpleNoLockTransactionLocalStressTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/tm/test/SimpleNoLockTransactionLocalStressTestCase.java	2007-09-19 11:08:07 UTC (rev 65467)
+++ trunk/testsuite/src/main/org/jboss/test/tm/test/SimpleNoLockTransactionLocalStressTestCase.java	2007-09-19 11:08:32 UTC (rev 65468)
@@ -23,6 +23,10 @@
 
 import javax.transaction.Transaction;
 
+import junit.framework.Test;
+
+import org.jboss.test.JBossTestCase;
+
 /**
  * A simple transaction local stress test.
  * 
@@ -75,4 +79,9 @@
    {
       super(name);
    }
+
+   public static Test suite() throws Exception
+   {
+      return JBossTestCase.getDeploySetup(SimpleNoLockTransactionLocalStressTestCase.class, "transaction-test.jar");
+   }
 }

Modified: trunk/testsuite/src/main/org/jboss/test/tm/test/SimpleTransactionLocalStressTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/tm/test/SimpleTransactionLocalStressTestCase.java	2007-09-19 11:08:07 UTC (rev 65467)
+++ trunk/testsuite/src/main/org/jboss/test/tm/test/SimpleTransactionLocalStressTestCase.java	2007-09-19 11:08:32 UTC (rev 65468)
@@ -23,6 +23,10 @@
 
 import javax.transaction.Transaction;
 
+import junit.framework.Test;
+
+import org.jboss.test.JBossTestCase;
+
 /**
  * A simple transaction local stress test.
  * 
@@ -83,4 +87,9 @@
    {
       super(name);
    }
+
+   public static Test suite() throws Exception
+   {
+      return JBossTestCase.getDeploySetup(SimpleTransactionLocalStressTestCase.class, "transaction-test.jar");
+   }
 }

Modified: trunk/testsuite/src/main/org/jboss/test/tm/test/SimpleUncontendedNoLockTransactionLocalStressTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/tm/test/SimpleUncontendedNoLockTransactionLocalStressTestCase.java	2007-09-19 11:08:07 UTC (rev 65467)
+++ trunk/testsuite/src/main/org/jboss/test/tm/test/SimpleUncontendedNoLockTransactionLocalStressTestCase.java	2007-09-19 11:08:32 UTC (rev 65468)
@@ -23,6 +23,10 @@
 
 import javax.transaction.Transaction;
 
+import junit.framework.Test;
+
+import org.jboss.test.JBossTestCase;
+
 /**
  * A simple transaction local stress test.
  * 
@@ -87,4 +91,9 @@
    {
       super(name);
    }
+
+   public static Test suite() throws Exception
+   {
+      return JBossTestCase.getDeploySetup(SimpleUncontendedNoLockTransactionLocalStressTestCase.class, "transaction-test.jar");
+   }
 }

Modified: trunk/testsuite/src/main/org/jboss/test/tm/test/SimpleUncontendedTransactionLocalStressTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/tm/test/SimpleUncontendedTransactionLocalStressTestCase.java	2007-09-19 11:08:07 UTC (rev 65467)
+++ trunk/testsuite/src/main/org/jboss/test/tm/test/SimpleUncontendedTransactionLocalStressTestCase.java	2007-09-19 11:08:32 UTC (rev 65468)
@@ -23,6 +23,10 @@
 
 import javax.transaction.Transaction;
 
+import junit.framework.Test;
+
+import org.jboss.test.JBossTestCase;
+
 /**
  * A simple transaction local stress test.
  * 
@@ -95,4 +99,9 @@
    {
       super(name);
    }
+
+   public static Test suite() throws Exception
+   {
+      return JBossTestCase.getDeploySetup(SimpleUncontendedTransactionLocalStressTestCase.class, "transaction-test.jar");
+   }
 }

Modified: trunk/testsuite/src/main/org/jboss/test/util/ejb/EJBTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/util/ejb/EJBTestCase.java	2007-09-19 11:08:07 UTC (rev 65467)
+++ trunk/testsuite/src/main/org/jboss/test/util/ejb/EJBTestCase.java	2007-09-19 11:08:32 UTC (rev 65468)
@@ -30,6 +30,7 @@
 import junit.framework.TestCase;
 import junit.framework.TestResult;
 
+import org.jboss.logging.Logger;
 import org.jboss.test.AbstractTestDelegate;
 import org.jboss.test.JBossTestServices;
 
@@ -67,10 +68,13 @@
  * @author <a href="mailto:dain at daingroup.com">Dain Sundstrom</a>
  * @author <a href="mailto:scott at jboss.org">Scott Stark</a>
  * @author <a href="mailto:dimitris at jboss.org">Dimitris Andreadis</a>
+ * @author adrian at jboss.org
  * @version $Revision$
  */
 public class EJBTestCase extends TestCase
 {
+   private static final Logger log = Logger.getLogger(EJBTestCase.class);
+   
    private boolean serverSide = false;
    protected Properties props;
 
@@ -229,6 +233,27 @@
    {
       // empty
    }
+
+   protected int getThreadCount()
+   {
+      int result = Integer.getInteger("jbosstest.threadcount", JBossTestServices.DEFAULT_THREADCOUNT).intValue();
+      log.debug("jbosstest.threadcount=" + result);
+      return result;
+   }
+
+   protected int getIterationCount()
+   {
+      int result = Integer.getInteger("jbosstest.iterationcount", JBossTestServices.DEFAULT_ITERATIONCOUNT).intValue();
+      log.debug("jbosstest.iterationcount=" + result);
+      return result;
+   }
+
+   protected int getBeanCount()
+   {
+      int result = Integer.getInteger("jbosstest.beancount", JBossTestServices.DEFAULT_BEANCOUNT).intValue();
+      log.debug("jbosstest.beancount=" + result);
+      return result;
+   }
    
    /** Tears down the ejb test case. This method is called after
     * each test is executed and is run in a private transaction.




More information about the jboss-cvs-commits mailing list