[jboss-cvs] JBossAS SVN: r61874 - branches/Branch_4_0/testsuite/src/main/org/jboss/test.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Mar 29 21:44:09 EDT 2007
Author: bstansberry at jboss.com
Date: 2007-03-29 21:44:09 -0400 (Thu, 29 Mar 2007)
New Revision: 61874
Modified:
branches/Branch_4_0/testsuite/src/main/org/jboss/test/JBossClusteredTestCase.java
Log:
Support deploying multiple packages
Modified: branches/Branch_4_0/testsuite/src/main/org/jboss/test/JBossClusteredTestCase.java
===================================================================
--- branches/Branch_4_0/testsuite/src/main/org/jboss/test/JBossClusteredTestCase.java 2007-03-30 01:43:16 UTC (rev 61873)
+++ branches/Branch_4_0/testsuite/src/main/org/jboss/test/JBossClusteredTestCase.java 2007-03-30 01:44:09 UTC (rev 61874)
@@ -21,6 +21,8 @@
*/
package org.jboss.test;
+import java.util.StringTokenizer;
+
import org.jboss.jmx.adaptor.rmi.RMIAdaptor;
import junit.framework.Test;
@@ -97,7 +99,7 @@
clusterServices.undeploy(server, name);
}
- public static Test getDeploySetup(final Test test, final String jarName)
+ public static Test getDeploySetup(final Test test, final String jarNames)
throws Exception
{
JBossTestSetup wrapper = new JBossTestClusteredSetup(test)
@@ -105,12 +107,18 @@
protected void setUp() throws Exception
{
- if (jarName == null) return;
+ if (jarNames == null) return;
deploymentException = null;
try
{
- this.deploy(jarName);
- this.getLog().debug("deployed package: " + jarName);
+ // deploy the comma seperated list of jars
+ StringTokenizer st = new StringTokenizer(jarNames, ", ");
+ while (st != null && st.hasMoreTokens())
+ {
+ String jarName = st.nextToken();
+ this.redeploy(jarName);
+ this.getLog().debug("deployed package: " + jarName);
+ }
}
catch (Exception ex)
{
@@ -118,7 +126,7 @@
deploymentException = ex;
}
- // wait a few seconds so that the cluster stabilize
+ // wait a few seconds so that the cluster stabilizes
synchronized (this)
{
wait(2000);
@@ -127,10 +135,21 @@
protected void tearDown() throws Exception
{
- if (jarName == null) return;
- this.getLog().debug("Attempt undeploy of " + jarName);
- this.undeploy(jarName);
- this.getLog().debug("undeployed package: " + jarName);
+ if (jarNames != null)
+ {
+ // deploy the comma seperated list of jars
+ StringTokenizer st = new StringTokenizer(jarNames, ", ");
+ String[] depoyments = new String[st.countTokens()];
+ for (int i = depoyments.length - 1; i >= 0; i--)
+ depoyments[i] = st.nextToken();
+ for (int i = 0; i < depoyments.length; i++)
+ {
+ String jarName = depoyments[i];
+ this.getLog().debug("Attempt undeploy of " + jarName);
+ this.undeploy(jarName);
+ this.getLog().debug("undeployed package: " + jarName);
+ }
+ }
}
};
return wrapper;
More information about the jboss-cvs-commits
mailing list