[jboss-cvs] JBossAS SVN: r65495 - in branches/Branch_4_2/testsuite: src/main/org/jboss/test/jca/test and 3 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Sep 20 10:21:36 EDT 2007
Author: adrian at jboss.org
Date: 2007-09-20 10:21:35 -0400 (Thu, 20 Sep 2007)
New Revision: 65495
Added:
branches/Branch_4_2/testsuite/src/resources/jca/test/
branches/Branch_4_2/testsuite/src/resources/jca/test/META-INF/
branches/Branch_4_2/testsuite/src/resources/jca/test/META-INF/ejb-jar.xml
branches/Branch_4_2/testsuite/src/resources/jca/test/META-INF/jboss.xml
Modified:
branches/Branch_4_2/testsuite/imports/sections/jca.xml
branches/Branch_4_2/testsuite/src/main/org/jboss/test/jca/test/AbstractConcurrentStressTest.java
branches/Branch_4_2/testsuite/src/main/org/jboss/test/jca/test/AbstractPoolingStressTest.java
branches/Branch_4_2/testsuite/src/main/org/jboss/test/jca/test/ContentiousInterleavingStressTestCase.java
branches/Branch_4_2/testsuite/src/main/org/jboss/test/jca/test/ContentiousRecyclingInterleavingStressTestCase.java
branches/Branch_4_2/testsuite/src/main/org/jboss/test/jca/test/ContentiousRecyclingStickyStressTestCase.java
branches/Branch_4_2/testsuite/src/main/org/jboss/test/jca/test/ContentiousStickyStressTestCase.java
branches/Branch_4_2/testsuite/src/main/org/jboss/test/jca/test/RecyclingInterleavingStressTestCase.java
branches/Branch_4_2/testsuite/src/main/org/jboss/test/jca/test/RecyclingStickyStressTestCase.java
branches/Branch_4_2/testsuite/src/main/org/jboss/test/jca/test/RecyclingStickyWithContinuousPoisonThreadStressTestCase.java
branches/Branch_4_2/testsuite/src/main/org/jboss/test/jca/test/RecyclingStickyWithPoisonThreadStressTestCase.java
branches/Branch_4_2/testsuite/src/main/org/jboss/test/jca/test/UncontendedInterleavingStressTestCase.java
branches/Branch_4_2/testsuite/src/main/org/jboss/test/jca/test/UncontendedStickyStressTestCase.java
Log:
JBAS-4520 - Move the pooling stress tests to the appserver
Modified: branches/Branch_4_2/testsuite/imports/sections/jca.xml
===================================================================
--- branches/Branch_4_2/testsuite/imports/sections/jca.xml 2007-09-20 13:58:05 UTC (rev 65494)
+++ branches/Branch_4_2/testsuite/imports/sections/jca.xml 2007-09-20 14:21:35 UTC (rev 65495)
@@ -209,6 +209,20 @@
</fileset>
</jar>
+
+ <jar destfile="${build.lib}/jca-tests.jar">
+ <fileset dir="${build.classes}">
+ <patternset refid="common.test.client.classes"/>
+ <include name="org/jboss/test/jca/**"/>
+ <include name="org/jboss/test/util/ejb/*"/>
+ </fileset>
+ <fileset dir="${build.resources}/jca/test">
+ <include name="**/*.*"/>
+ </fileset>
+ <zipfileset src="${junit.junit.lib}/junit.jar">
+ <patternset refid="ejbrunner.set"/>
+ </zipfileset>
+ </jar>
</target>
<!-- jca property test -->
Modified: branches/Branch_4_2/testsuite/src/main/org/jboss/test/jca/test/AbstractConcurrentStressTest.java
===================================================================
--- branches/Branch_4_2/testsuite/src/main/org/jboss/test/jca/test/AbstractConcurrentStressTest.java 2007-09-20 13:58:05 UTC (rev 65494)
+++ branches/Branch_4_2/testsuite/src/main/org/jboss/test/jca/test/AbstractConcurrentStressTest.java 2007-09-20 14:21:35 UTC (rev 65495)
@@ -23,7 +23,8 @@
import java.util.ArrayList;
-import org.jboss.test.JBossTestCase;
+import org.jboss.logging.Logger;
+import org.jboss.test.util.ejb.EJBTestCase;
import EDU.oswego.cs.dl.util.concurrent.SynchronizedInt;
@@ -33,8 +34,10 @@
* @author <a href="adrian at jboss.com">Adrian Brock</a>
* @version $Revision$
*/
-public class AbstractConcurrentStressTest extends JBossTestCase
+public class AbstractConcurrentStressTest extends EJBTestCase
{
+ protected final Logger log = Logger.getLogger(getClass());
+
private ArrayList done = new ArrayList();
private int total;
private Throwable failed = null;
Modified: branches/Branch_4_2/testsuite/src/main/org/jboss/test/jca/test/AbstractPoolingStressTest.java
===================================================================
--- branches/Branch_4_2/testsuite/src/main/org/jboss/test/jca/test/AbstractPoolingStressTest.java 2007-09-20 13:58:05 UTC (rev 65494)
+++ branches/Branch_4_2/testsuite/src/main/org/jboss/test/jca/test/AbstractPoolingStressTest.java 2007-09-20 14:21:35 UTC (rev 65495)
@@ -21,6 +21,7 @@
*/
package org.jboss.test.jca.test;
+import javax.management.MBeanServer;
import javax.resource.ResourceException;
import javax.resource.cci.ConnectionFactory;
import javax.resource.spi.ConnectionManager;
@@ -29,17 +30,17 @@
import javax.transaction.TransactionManager;
import org.jboss.logging.Logger;
+import org.jboss.mx.util.MBeanServerLocator;
import org.jboss.resource.connectionmanager.CachedConnectionManager;
+import org.jboss.resource.connectionmanager.CachedConnectionManagerMBean;
import org.jboss.resource.connectionmanager.InternalManagedConnectionPool;
import org.jboss.resource.connectionmanager.JBossManagedConnectionPool;
import org.jboss.resource.connectionmanager.ManagedConnectionPool;
-import org.jboss.resource.connectionmanager.TransactionSynchronizer;
import org.jboss.resource.connectionmanager.TxConnectionManager;
import org.jboss.test.jca.adapter.TestConnectionFactory;
import org.jboss.test.jca.adapter.TestConnectionRequestInfo;
import org.jboss.test.jca.adapter.TestManagedConnectionFactory;
import org.jboss.tm.TransactionManagerLocator;
-import org.jboss.tm.usertx.client.ServerVMClientUserTransaction;
/**
* Abstract pooling stress test.
@@ -53,7 +54,6 @@
Logger poolLog = Logger.getLogger(JBossManagedConnectionPool.class);
protected TransactionManager tm;
- private ServerVMClientUserTransaction ut;
private CachedConnectionManager ccm;
private TestManagedConnectionFactory mcf;
private TxConnectionManager cm;
@@ -64,10 +64,8 @@
{
log.debug("================> Start " + getName());
tm = TransactionManagerLocator.getInstance().locate();
- TransactionSynchronizer.setTransactionManager(tm);
- ut = new ServerVMClientUserTransaction(tm);
- ccm = new CachedConnectionManager();
- ut.registerTxStartedListener(ccm);
+ MBeanServer server = MBeanServerLocator.locateJBoss();
+ ccm = (CachedConnectionManager) server.getAttribute(CachedConnectionManagerMBean.OBJECT_NAME, "Instance");
mcf = new TestManagedConnectionFactory();
InternalManagedConnectionPool.PoolParams pp = new InternalManagedConnectionPool.PoolParams();
@@ -106,7 +104,6 @@
{
JBossManagedConnectionPool.OnePool pool = (JBossManagedConnectionPool.OnePool) cm.getPoolingStrategy();
pool.shutdown();
- ut = null;
log.debug("================> End " + getName());
}
Modified: branches/Branch_4_2/testsuite/src/main/org/jboss/test/jca/test/ContentiousInterleavingStressTestCase.java
===================================================================
--- branches/Branch_4_2/testsuite/src/main/org/jboss/test/jca/test/ContentiousInterleavingStressTestCase.java 2007-09-20 13:58:05 UTC (rev 65494)
+++ branches/Branch_4_2/testsuite/src/main/org/jboss/test/jca/test/ContentiousInterleavingStressTestCase.java 2007-09-20 14:21:35 UTC (rev 65495)
@@ -24,6 +24,10 @@
import javax.resource.cci.Connection;
import javax.transaction.Transaction;
+import junit.framework.Test;
+
+import org.jboss.test.JBossTestCase;
+
/**
* Contentious pooling stress test.
*
@@ -32,6 +36,11 @@
*/
public class ContentiousInterleavingStressTestCase extends AbstractContentiousPoolingStressTest
{
+ public static Test suite() throws Exception
+ {
+ return JBossTestCase.getDeploySetup(ContentiousInterleavingStressTestCase.class, "jca-tests.jar");
+ }
+
public void testIt() throws Throwable
{
tm.setTransactionTimeout(0);
Modified: branches/Branch_4_2/testsuite/src/main/org/jboss/test/jca/test/ContentiousRecyclingInterleavingStressTestCase.java
===================================================================
--- branches/Branch_4_2/testsuite/src/main/org/jboss/test/jca/test/ContentiousRecyclingInterleavingStressTestCase.java 2007-09-20 13:58:05 UTC (rev 65494)
+++ branches/Branch_4_2/testsuite/src/main/org/jboss/test/jca/test/ContentiousRecyclingInterleavingStressTestCase.java 2007-09-20 14:21:35 UTC (rev 65495)
@@ -23,6 +23,10 @@
import javax.resource.cci.Connection;
+import junit.framework.Test;
+
+import org.jboss.test.JBossTestCase;
+
/**
* Uncontended pooling stress test.
*
@@ -31,6 +35,10 @@
*/
public class ContentiousRecyclingInterleavingStressTestCase extends AbstractContentiousRecyclingPoolingStressTest
{
+ public static Test suite() throws Exception
+ {
+ return JBossTestCase.getDeploySetup(ContentiousRecyclingInterleavingStressTestCase.class, "jca-tests.jar");
+ }
public void testIt() throws Throwable
{
Modified: branches/Branch_4_2/testsuite/src/main/org/jboss/test/jca/test/ContentiousRecyclingStickyStressTestCase.java
===================================================================
--- branches/Branch_4_2/testsuite/src/main/org/jboss/test/jca/test/ContentiousRecyclingStickyStressTestCase.java 2007-09-20 13:58:05 UTC (rev 65494)
+++ branches/Branch_4_2/testsuite/src/main/org/jboss/test/jca/test/ContentiousRecyclingStickyStressTestCase.java 2007-09-20 14:21:35 UTC (rev 65495)
@@ -23,6 +23,10 @@
import javax.resource.cci.Connection;
+import junit.framework.Test;
+
+import org.jboss.test.JBossTestCase;
+
/**
* Uncontended pooling stress test.
*
@@ -31,6 +35,11 @@
*/
public class ContentiousRecyclingStickyStressTestCase extends AbstractContentiousRecyclingPoolingStressTest
{
+ public static Test suite() throws Exception
+ {
+ return JBossTestCase.getDeploySetup(ContentiousStickyStressTestCase.class, "jca-tests.jar");
+ }
+
public boolean isSticky()
{
return true;
Modified: branches/Branch_4_2/testsuite/src/main/org/jboss/test/jca/test/ContentiousStickyStressTestCase.java
===================================================================
--- branches/Branch_4_2/testsuite/src/main/org/jboss/test/jca/test/ContentiousStickyStressTestCase.java 2007-09-20 13:58:05 UTC (rev 65494)
+++ branches/Branch_4_2/testsuite/src/main/org/jboss/test/jca/test/ContentiousStickyStressTestCase.java 2007-09-20 14:21:35 UTC (rev 65495)
@@ -24,6 +24,10 @@
import javax.resource.cci.Connection;
import javax.transaction.Transaction;
+import junit.framework.Test;
+
+import org.jboss.test.JBossTestCase;
+
/**
* Contentious pooling stress test.
*
@@ -32,6 +36,11 @@
*/
public class ContentiousStickyStressTestCase extends AbstractContentiousPoolingStressTest
{
+ public static Test suite() throws Exception
+ {
+ return JBossTestCase.getDeploySetup(ContentiousStickyStressTestCase.class, "jca-tests.jar");
+ }
+
public boolean isSticky()
{
return true;
Modified: branches/Branch_4_2/testsuite/src/main/org/jboss/test/jca/test/RecyclingInterleavingStressTestCase.java
===================================================================
--- branches/Branch_4_2/testsuite/src/main/org/jboss/test/jca/test/RecyclingInterleavingStressTestCase.java 2007-09-20 13:58:05 UTC (rev 65494)
+++ branches/Branch_4_2/testsuite/src/main/org/jboss/test/jca/test/RecyclingInterleavingStressTestCase.java 2007-09-20 14:21:35 UTC (rev 65495)
@@ -23,6 +23,10 @@
import javax.resource.cci.Connection;
+import junit.framework.Test;
+
+import org.jboss.test.JBossTestCase;
+
/**
* Uncontended pooling stress test.
*
@@ -31,6 +35,11 @@
*/
public class RecyclingInterleavingStressTestCase extends AbstractRecyclingPoolingStressTest
{
+ public static Test suite() throws Exception
+ {
+ return JBossTestCase.getDeploySetup(RecyclingInterleavingStressTestCase.class, "jca-tests.jar");
+ }
+
public void testIt() throws Throwable
{
tm.setTransactionTimeout(0);
Modified: branches/Branch_4_2/testsuite/src/main/org/jboss/test/jca/test/RecyclingStickyStressTestCase.java
===================================================================
--- branches/Branch_4_2/testsuite/src/main/org/jboss/test/jca/test/RecyclingStickyStressTestCase.java 2007-09-20 13:58:05 UTC (rev 65494)
+++ branches/Branch_4_2/testsuite/src/main/org/jboss/test/jca/test/RecyclingStickyStressTestCase.java 2007-09-20 14:21:35 UTC (rev 65495)
@@ -23,6 +23,10 @@
import javax.resource.cci.Connection;
+import junit.framework.Test;
+
+import org.jboss.test.JBossTestCase;
+
/**
* Uncontended pooling stress test.
*
@@ -31,6 +35,11 @@
*/
public class RecyclingStickyStressTestCase extends AbstractRecyclingPoolingStressTest
{
+ public static Test suite() throws Exception
+ {
+ return JBossTestCase.getDeploySetup(RecyclingStickyStressTestCase.class, "jca-tests.jar");
+ }
+
public boolean isSticky()
{
return true;
Modified: branches/Branch_4_2/testsuite/src/main/org/jboss/test/jca/test/RecyclingStickyWithContinuousPoisonThreadStressTestCase.java
===================================================================
--- branches/Branch_4_2/testsuite/src/main/org/jboss/test/jca/test/RecyclingStickyWithContinuousPoisonThreadStressTestCase.java 2007-09-20 13:58:05 UTC (rev 65494)
+++ branches/Branch_4_2/testsuite/src/main/org/jboss/test/jca/test/RecyclingStickyWithContinuousPoisonThreadStressTestCase.java 2007-09-20 14:21:35 UTC (rev 65495)
@@ -23,6 +23,10 @@
import javax.resource.cci.Connection;
+import junit.framework.Test;
+
+import org.jboss.test.JBossTestCase;
+
/**
* Uncontended pooling stress test.
*
@@ -31,6 +35,11 @@
*/
public class RecyclingStickyWithContinuousPoisonThreadStressTestCase extends AbstractRecyclingPoolingStressTest
{
+ public static Test suite() throws Exception
+ {
+ return JBossTestCase.getDeploySetup(RecyclingStickyWithContinuousPoisonThreadStressTestCase.class, "jca-tests.jar");
+ }
+
public boolean isSticky()
{
return true;
Modified: branches/Branch_4_2/testsuite/src/main/org/jboss/test/jca/test/RecyclingStickyWithPoisonThreadStressTestCase.java
===================================================================
--- branches/Branch_4_2/testsuite/src/main/org/jboss/test/jca/test/RecyclingStickyWithPoisonThreadStressTestCase.java 2007-09-20 13:58:05 UTC (rev 65494)
+++ branches/Branch_4_2/testsuite/src/main/org/jboss/test/jca/test/RecyclingStickyWithPoisonThreadStressTestCase.java 2007-09-20 14:21:35 UTC (rev 65495)
@@ -23,6 +23,10 @@
import javax.resource.cci.Connection;
+import junit.framework.Test;
+
+import org.jboss.test.JBossTestCase;
+
/**
* Uncontended pooling stress test.
*
@@ -31,6 +35,11 @@
*/
public class RecyclingStickyWithPoisonThreadStressTestCase extends AbstractRecyclingPoolingStressTest
{
+ public static Test suite() throws Exception
+ {
+ return JBossTestCase.getDeploySetup(RecyclingStickyWithPoisonThreadStressTestCase.class, "jca-tests.jar");
+ }
+
public boolean isSticky()
{
return true;
Modified: branches/Branch_4_2/testsuite/src/main/org/jboss/test/jca/test/UncontendedInterleavingStressTestCase.java
===================================================================
--- branches/Branch_4_2/testsuite/src/main/org/jboss/test/jca/test/UncontendedInterleavingStressTestCase.java 2007-09-20 13:58:05 UTC (rev 65494)
+++ branches/Branch_4_2/testsuite/src/main/org/jboss/test/jca/test/UncontendedInterleavingStressTestCase.java 2007-09-20 14:21:35 UTC (rev 65495)
@@ -23,6 +23,10 @@
import javax.resource.cci.Connection;
+import junit.framework.Test;
+
+import org.jboss.test.JBossTestCase;
+
/**
* Uncontended pooling stress test.
*
@@ -31,6 +35,11 @@
*/
public class UncontendedInterleavingStressTestCase extends AbstractUncontendedPoolingStressTest
{
+ public static Test suite() throws Exception
+ {
+ return JBossTestCase.getDeploySetup(UncontendedInterleavingStressTestCase.class, "jca-tests.jar");
+ }
+
public void testIt() throws Throwable
{
tm.setTransactionTimeout(0);
Modified: branches/Branch_4_2/testsuite/src/main/org/jboss/test/jca/test/UncontendedStickyStressTestCase.java
===================================================================
--- branches/Branch_4_2/testsuite/src/main/org/jboss/test/jca/test/UncontendedStickyStressTestCase.java 2007-09-20 13:58:05 UTC (rev 65494)
+++ branches/Branch_4_2/testsuite/src/main/org/jboss/test/jca/test/UncontendedStickyStressTestCase.java 2007-09-20 14:21:35 UTC (rev 65495)
@@ -23,6 +23,10 @@
import javax.resource.cci.Connection;
+import junit.framework.Test;
+
+import org.jboss.test.JBossTestCase;
+
/**
* Uncontended pooling stress test.
*
@@ -31,6 +35,10 @@
*/
public class UncontendedStickyStressTestCase extends AbstractUncontendedPoolingStressTest
{
+ public static Test suite() throws Exception
+ {
+ return JBossTestCase.getDeploySetup(UncontendedStickyStressTestCase.class, "jca-tests.jar");
+ }
protected int getMaxPoolSize()
{
Added: branches/Branch_4_2/testsuite/src/resources/jca/test/META-INF/ejb-jar.xml
===================================================================
--- branches/Branch_4_2/testsuite/src/resources/jca/test/META-INF/ejb-jar.xml (rev 0)
+++ branches/Branch_4_2/testsuite/src/resources/jca/test/META-INF/ejb-jar.xml 2007-09-20 14:21:35 UTC (rev 65495)
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<!DOCTYPE ejb-jar PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"
+ "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
+
+<ejb-jar>
+ <enterprise-beans>
+ <session>
+ <description>JUnit Session Bean Test Runner</description>
+ <ejb-name>EJBTestRunnerEJB</ejb-name>
+ <home>org.jboss.test.util.ejb.EJBTestRunnerHome</home>
+ <remote>org.jboss.test.util.ejb.EJBTestRunner</remote>
+ <ejb-class>org.jboss.test.util.ejb.EJBTestRunnerBean</ejb-class>
+ <session-type>Stateless</session-type>
+ <transaction-type>Bean</transaction-type>
+ <env-entry>
+ <env-entry-name>NO_USER_TRANSACTION</env-entry-name>
+ <env-entry-type>java.lang.String</env-entry-type>
+ <env-entry-value>true</env-entry-value>
+ </env-entry>
+ </session>
+ </enterprise-beans>
+</ejb-jar>
Added: branches/Branch_4_2/testsuite/src/resources/jca/test/META-INF/jboss.xml
===================================================================
--- branches/Branch_4_2/testsuite/src/resources/jca/test/META-INF/jboss.xml (rev 0)
+++ branches/Branch_4_2/testsuite/src/resources/jca/test/META-INF/jboss.xml 2007-09-20 14:21:35 UTC (rev 65495)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE jboss PUBLIC
+ "-//JBoss//DTD JBOSS 3.2//EN"
+ "http://www.jboss.org/j2ee/dtd/jboss_3_2.dtd">
+
+<jboss>
+ <enterprise-beans>
+ <session>
+ <ejb-name>EJBTestRunnerEJB</ejb-name>
+ <jndi-name>ejb/EJBTestRunner</jndi-name>
+ </session>
+ </enterprise-beans>
+</jboss>
More information about the jboss-cvs-commits
mailing list