[jboss-cvs] JBossAS SVN: r93912 - trunk/testsuite/src/main/org/jboss/test/deployers/test.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Sep 22 05:10:37 EDT 2009
Author: emuckenhuber
Date: 2009-09-22 05:10:35 -0400 (Tue, 22 Sep 2009)
New Revision: 93912
Modified:
trunk/testsuite/src/main/org/jboss/test/deployers/test/AbstractDeployTestBase.java
trunk/testsuite/src/main/org/jboss/test/deployers/test/DeploymentManagerUnitTestCase.java
Log:
rename deployments to avoid conflicts with other tests.
Modified: trunk/testsuite/src/main/org/jboss/test/deployers/test/AbstractDeployTestBase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/deployers/test/AbstractDeployTestBase.java 2009-09-22 09:05:39 UTC (rev 93911)
+++ trunk/testsuite/src/main/org/jboss/test/deployers/test/AbstractDeployTestBase.java 2009-09-22 09:10:35 UTC (rev 93912)
@@ -80,15 +80,30 @@
{
return distributeAndStart(deploymentName, copyContent, true);
}
-
+
DeploymentProgress distributeAndStart(String deploymentName, boolean copyContent, boolean checkStopped) throws Exception
{
+ return distributeAndStart(deploymentName, deploymentName, copyContent, true);
+ }
+
+ /**
+ * Distribute and start a deployment.
+ *
+ * @param deployment the deployment
+ * @param deploymentName the new (server side) deployment name
+ * @param copyContent is copyContent
+ * @param checkStopped check the if the deployment is stopped after distribute
+ * @return the DeploymentProgress of the start operation
+ * @throws Exception
+ */
+ DeploymentProgress distributeAndStart(String deployment, String deploymentName, boolean copyContent, boolean checkStopped) throws Exception
+ {
// The deployment manager
DeploymentManager deployMgr = getDeploymentManager();
// Distribute
DeploymentProgress distribute = deployMgr.distribute(deploymentName,
- getDeployURL(deploymentName), copyContent);
+ getDeployURL(deployment), copyContent);
distribute.run();
// Distribute always has to complete
assertComplete(distribute);
@@ -109,12 +124,26 @@
DeploymentProgress distributeAndStart(String deploymentName, DeploymentOption... options) throws Exception
{
+ return distributeAndStart(deploymentName, deploymentName, options);
+ }
+
+ /**
+ * Distribute and start a deployment
+ *
+ * @param deployment the deployment
+ * @param deploymentName the new (server side) deployment name
+ * @param options the deployment options
+ * @return the DeploymentProgress of the start operation
+ * @throws Exception
+ */
+ DeploymentProgress distributeAndStart(String deployment, String deploymentName, DeploymentOption... options) throws Exception
+ {
// The deployment manager
DeploymentManager deployMgr = getDeploymentManager();
// Distribute
DeploymentProgress distribute = deployMgr.distribute(deploymentName,
- getDeployURL(deploymentName), options);
+ getDeployURL(deployment), options);
distribute.run();
// Distribute always has to complete
assertComplete(distribute);
Modified: trunk/testsuite/src/main/org/jboss/test/deployers/test/DeploymentManagerUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/deployers/test/DeploymentManagerUnitTestCase.java 2009-09-22 09:05:39 UTC (rev 93911)
+++ trunk/testsuite/src/main/org/jboss/test/deployers/test/DeploymentManagerUnitTestCase.java 2009-09-22 09:10:35 UTC (rev 93912)
@@ -80,21 +80,22 @@
*/
public void testDistributeOverride() throws Exception
{
+ final String deploymentName = getName() + ".ear";
try
{
for(int i = 0; i < 5; i++)
{
//
- DeploymentProgress start = distributeAndStart(NESTED_DEPLOYMENT, true, false);
+ DeploymentProgress start = distributeAndStart(NESTED_DEPLOYMENT, deploymentName, true, false);
assertComplete(start);
// disable stopped check, as it was started before
- start = distributeAndStart(NESTED_DEPLOYMENT, true, false);
+ start = distributeAndStart(NESTED_DEPLOYMENT, deploymentName, true, false);
assertComplete(start);
Thread.sleep(5);
- redeployCheckComplete(NESTED_DEPLOYMENT);
+ redeployCheckComplete(deploymentName);
}
}
catch(Exception e)
@@ -102,7 +103,7 @@
log.debug("Failed ", e);
throw e;
}
- stopAndRemove(new String[] { NESTED_DEPLOYMENT });
+ stopAndRemove(new String[] { deploymentName });
}
/**
@@ -168,14 +169,15 @@
*/
public void testDeploymentOptions() throws Exception
{
+ final String deploymentName = getName() + ".ear";
try
{
// Test exploded
- distributeAndStart(NESTED_DEPLOYMENT,
+ distributeAndStart(NESTED_DEPLOYMENT, deploymentName,
new DeploymentOption[] { DeploymentOption.Explode});
// Test fail if exists
- DeploymentProgress override = getDeploymentManager().distribute(NESTED_DEPLOYMENT,
+ DeploymentProgress override = getDeploymentManager().distribute(deploymentName,
getDeployURL(NESTED_DEPLOYMENT),
new DeploymentOption[] { DeploymentOption.FailIfExists});
override.run();
@@ -186,7 +188,7 @@
log.error("Failed ", e);
throw e;
}
- stopAndRemove(new String[] { NESTED_DEPLOYMENT } );
+ stopAndRemove(new String[] { deploymentName } );
}
/**
@@ -233,10 +235,11 @@
*/
public void testRemoveConflict() throws Exception
{
+ final String deploymentName = getName() + ".ear";
getDeploymentManager().loadProfile(deployersKey);
try
{
- DeploymentProgress start = distributeAndStart(NESTED_DEPLOYMENT, true, false);
+ DeploymentProgress start = distributeAndStart(NESTED_DEPLOYMENT, deploymentName, true, false);
String deployed = start.getDeploymentID().getRepositoryNames()[0];
// Delete the file manually
@@ -245,7 +248,7 @@
assertTrue(deployed, f.exists());
assertTrue("deleted " + deployed, f.delete());
- stopAndRemove(new String[] { NESTED_DEPLOYMENT });
+ stopAndRemove(new String[] { deploymentName });
}
finally
{
More information about the jboss-cvs-commits
mailing list