[jboss-cvs] JBossAS SVN: r65467 - in branches/Branch_4_2/testsuite/src/main/org/jboss/test: util/ejb and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Sep 19 07:08:07 EDT 2007
Author: adrian at jboss.org
Date: 2007-09-19 07:08:07 -0400 (Wed, 19 Sep 2007)
New Revision: 65467
Modified:
branches/Branch_4_2/testsuite/src/main/org/jboss/test/tm/test/AbstractConcurrentStressTest.java
branches/Branch_4_2/testsuite/src/main/org/jboss/test/tm/test/AbstractTransactionLocalStressTest.java
branches/Branch_4_2/testsuite/src/main/org/jboss/test/tm/test/SimpleNoLockTransactionLocalStressTestCase.java
branches/Branch_4_2/testsuite/src/main/org/jboss/test/tm/test/SimpleTransactionLocalStressTestCase.java
branches/Branch_4_2/testsuite/src/main/org/jboss/test/tm/test/SimpleUncontendedNoLockTransactionLocalStressTestCase.java
branches/Branch_4_2/testsuite/src/main/org/jboss/test/tm/test/SimpleUncontendedTransactionLocalStressTestCase.java
branches/Branch_4_2/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: branches/Branch_4_2/testsuite/src/main/org/jboss/test/tm/test/AbstractConcurrentStressTest.java
===================================================================
--- branches/Branch_4_2/testsuite/src/main/org/jboss/test/tm/test/AbstractConcurrentStressTest.java 2007-09-19 09:13:12 UTC (rev 65466)
+++ branches/Branch_4_2/testsuite/src/main/org/jboss/test/tm/test/AbstractConcurrentStressTest.java 2007-09-19 11:08:07 UTC (rev 65467)
@@ -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: branches/Branch_4_2/testsuite/src/main/org/jboss/test/tm/test/AbstractTransactionLocalStressTest.java
===================================================================
--- branches/Branch_4_2/testsuite/src/main/org/jboss/test/tm/test/AbstractTransactionLocalStressTest.java 2007-09-19 09:13:12 UTC (rev 65466)
+++ branches/Branch_4_2/testsuite/src/main/org/jboss/test/tm/test/AbstractTransactionLocalStressTest.java 2007-09-19 11:08:07 UTC (rev 65467)
@@ -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.getInstance().locate();
protected TransactionLocal local = new TransactionLocal(tm);
public abstract class ConcurrentTransactionLocalRunnable extends ConcurrentRunnable
Modified: branches/Branch_4_2/testsuite/src/main/org/jboss/test/tm/test/SimpleNoLockTransactionLocalStressTestCase.java
===================================================================
--- branches/Branch_4_2/testsuite/src/main/org/jboss/test/tm/test/SimpleNoLockTransactionLocalStressTestCase.java 2007-09-19 09:13:12 UTC (rev 65466)
+++ branches/Branch_4_2/testsuite/src/main/org/jboss/test/tm/test/SimpleNoLockTransactionLocalStressTestCase.java 2007-09-19 11:08:07 UTC (rev 65467)
@@ -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: branches/Branch_4_2/testsuite/src/main/org/jboss/test/tm/test/SimpleTransactionLocalStressTestCase.java
===================================================================
--- branches/Branch_4_2/testsuite/src/main/org/jboss/test/tm/test/SimpleTransactionLocalStressTestCase.java 2007-09-19 09:13:12 UTC (rev 65466)
+++ branches/Branch_4_2/testsuite/src/main/org/jboss/test/tm/test/SimpleTransactionLocalStressTestCase.java 2007-09-19 11:08:07 UTC (rev 65467)
@@ -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: branches/Branch_4_2/testsuite/src/main/org/jboss/test/tm/test/SimpleUncontendedNoLockTransactionLocalStressTestCase.java
===================================================================
--- branches/Branch_4_2/testsuite/src/main/org/jboss/test/tm/test/SimpleUncontendedNoLockTransactionLocalStressTestCase.java 2007-09-19 09:13:12 UTC (rev 65466)
+++ branches/Branch_4_2/testsuite/src/main/org/jboss/test/tm/test/SimpleUncontendedNoLockTransactionLocalStressTestCase.java 2007-09-19 11:08:07 UTC (rev 65467)
@@ -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: branches/Branch_4_2/testsuite/src/main/org/jboss/test/tm/test/SimpleUncontendedTransactionLocalStressTestCase.java
===================================================================
--- branches/Branch_4_2/testsuite/src/main/org/jboss/test/tm/test/SimpleUncontendedTransactionLocalStressTestCase.java 2007-09-19 09:13:12 UTC (rev 65466)
+++ branches/Branch_4_2/testsuite/src/main/org/jboss/test/tm/test/SimpleUncontendedTransactionLocalStressTestCase.java 2007-09-19 11:08:07 UTC (rev 65467)
@@ -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: branches/Branch_4_2/testsuite/src/main/org/jboss/test/util/ejb/EJBTestCase.java
===================================================================
--- branches/Branch_4_2/testsuite/src/main/org/jboss/test/util/ejb/EJBTestCase.java 2007-09-19 09:13:12 UTC (rev 65466)
+++ branches/Branch_4_2/testsuite/src/main/org/jboss/test/util/ejb/EJBTestCase.java 2007-09-19 11:08:07 UTC (rev 65467)
@@ -30,6 +30,8 @@
import junit.framework.TestCase;
import junit.framework.TestResult;
+import org.jboss.logging.Logger;
+
/**
* An ejb test case is an extension to test case where the test is executed
* in the ejb server's virtual machine.
@@ -68,6 +70,8 @@
*/
public class EJBTestCase extends TestCase
{
+ private static final Logger log = Logger.getLogger(EJBTestCase.class);
+
private boolean serverSide = false;
protected Properties props;
@@ -220,7 +224,28 @@
{
// empty
}
+
+ protected int getThreadCount()
+ {
+ int result = Integer.getInteger("jbosstest.threadcount", 10).intValue();
+ log.debug("jbosstest.threadcount=" + result);
+ return result;
+ }
+ protected int getIterationCount()
+ {
+ int result = Integer.getInteger("jbosstest.iterationcount", 100).intValue();
+ log.debug("jbosstest.iterationcount=" + result);
+ return result;
+ }
+
+ protected int getBeanCount()
+ {
+ int result = Integer.getInteger("jbosstest.beancount", 100).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.
* @param props the properties passed in from the client
More information about the jboss-cvs-commits
mailing list