User: d_jencks
Date: 02/01/29 14:00:04
Modified: src/main/org/jboss/test/jmx/test
ConnectionFactoryLoaderUnitTestCase.java
DeployServiceUnitTestCase.java
Log:
simplified deployment calls
Revision Changes Path
1.10 +3 -3
jbosstest/src/main/org/jboss/test/jmx/test/ConnectionFactoryLoaderUnitTestCase.java
Index: ConnectionFactoryLoaderUnitTestCase.java
===================================================================
RCS file:
/cvsroot/jboss/jbosstest/src/main/org/jboss/test/jmx/test/ConnectionFactoryLoaderUnitTestCase.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- ConnectionFactoryLoaderUnitTestCase.java 2002/01/03 15:46:14 1.9
+++ ConnectionFactoryLoaderUnitTestCase.java 2002/01/29 22:00:04 1.10
@@ -33,7 +33,7 @@
/**
* @see <related>
* @author <a href="mailto:[EMAIL PROTECTED]">David Jencks</a>
- * @version $Revision: 1.9 $
+ * @version $Revision: 1.10 $
*/
public class ConnectionFactoryLoaderUnitTestCase
extends JBossTestCase
@@ -119,7 +119,7 @@
assertTrue("State is not started",
"Started".equals(getServer().getAttribute(connectionFactoryLoaderName,
"StateString")));
//deploy test session bean to look up datasource
- deployJ2ee("jmxtest.jar");
+ deploy("jmxtest.jar");
//see if the ConnectionFactory was loaded and works
InitialContext ctx = getInitialContext();
@@ -128,7 +128,7 @@
tds.testDataSource("java:ConnectionFactoryLoaderTestDS");
//undeploy the test ejb
- undeployJ2ee("jmxtest.jar");
+ undeploy("jmxtest.jar");
//undeploy test connection factory loader.
invoke(serviceControllerName,
1.11 +52 -52
jbosstest/src/main/org/jboss/test/jmx/test/DeployServiceUnitTestCase.java
Index: DeployServiceUnitTestCase.java
===================================================================
RCS file:
/cvsroot/jboss/jbosstest/src/main/org/jboss/test/jmx/test/DeployServiceUnitTestCase.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- DeployServiceUnitTestCase.java 2002/01/03 04:01:01 1.10
+++ DeployServiceUnitTestCase.java 2002/01/29 22:00:04 1.11
@@ -31,7 +31,7 @@
/**
* @see <related>
* @author <a href="mailto:[EMAIL PROTECTED]">David Jencks</a>
- * @version $Revision: 1.10 $
+ * @version $Revision: 1.11 $
*/
public class DeployServiceUnitTestCase
extends JBossTestCase
@@ -103,20 +103,20 @@
assertTrue("test mbean already registered before deploy",
!getServer().isRegistered(testObjectName));
//deploy the test xml doc.
- deployService(testUrl);
+ deploy(testUrl);
//check deployment registered expected mbeans
assertTrue("test mbean not registered after deploy",
getServer().isRegistered(testObjectName));
//deploy the test xml doc again, should undeploy and redeploy.
- undeployService(testUrl);
- deployService(testUrl);
+ undeploy(testUrl);
+ deploy(testUrl);
//check deployment registered expected mbeans
assertTrue("test mbean not registered after redeploy",
getServer().isRegistered(testObjectName));
//undeploy test xml doc.
- undeployService(testUrl);
+ undeploy(testUrl);
//check they aren't there any more
assertTrue("test mbean still registered after undeploy",
!getServer().isRegistered(testObjectName));
@@ -146,7 +146,7 @@
assertTrue("test mbean already registered before deploy",
!getServer().isRegistered(testObjectName));
//deploy the test xml doc.
- deployService(testUrl);
+ deploy(testUrl);
//check deployment registered expected mbeans
assertTrue("test mbean not registered after deploy",
getServer().isRegistered(testObjectName));
@@ -170,14 +170,14 @@
fail("could not remove mbean after class loaded in jsr" + e);
}
//deploy the test xml doc again, should undeploy and redeploy.
- undeployService(testUrl);
- deployService(testUrl);
+ undeploy(testUrl);
+ deploy(testUrl);
//check deployment registered expected mbeans
assertTrue("test mbean not registered after redeploy",
getServer().isRegistered(testObjectName));
//undeploy test xml doc.
- undeployService(testUrl);
+ undeploy(testUrl);
//check they aren't there any more
assertTrue("test mbean still registered after undeploy",
!getServer().isRegistered(testObjectName));
@@ -198,13 +198,13 @@
}
//deploy the test xml doc a second time.
- deployService(testUrl);
+ deploy(testUrl);
//check deployment registered expected mbeans
assertTrue("test mbean not registered after deploy",
getServer().isRegistered(testObjectName));
//undeploy test xml doc.
- undeployService(testUrl);
+ undeploy(testUrl);
//check they aren't there any more
assertTrue("test mbean still registered after undeploy",
!getServer().isRegistered(testObjectName));
@@ -243,9 +243,9 @@
assertTrue("test mbean already registered before deploy",
!getServer().isRegistered(testObjectNameC));
//deploy the test jsrs.
- deployService(testUrlA);
- deployService(testUrlB);
- deployService(testUrlC);
+ deploy(testUrlA);
+ deploy(testUrlB);
+ deploy(testUrlC);
//check deployment registered expected mbeans
assertTrue("test mbean A not registered after deploy",
getServer().isRegistered(testObjectNameA));
@@ -256,7 +256,7 @@
//undeploy test xml doc.
- undeployService(testUrlA);
+ undeploy(testUrlA);
//check they aren't there any more or they have stopped.
assertTrue("test mbean A still registered after undeploy of A",
!getServer().isRegistered(testObjectNameA));
@@ -266,11 +266,11 @@
//Now undeploy B, should prevent redeploy of C when A is redeployed.
// not working, skip for now
- undeployService(testUrlB);
+ undeploy(testUrlB);
assertTrue("test mbean B is registered after undeploy of B",
!getServer().isRegistered(testObjectNameB));
//deploy the test jsr A doc a second time.
- deployService(testUrlA);
+ deploy(testUrlA);
// check deployment registered expected mbeans
assertTrue("test mbean A not registered after deploy of A",
getServer().isRegistered(testObjectNameA));
@@ -280,7 +280,7 @@
assertTrue("test mbean C started after deploy of A, with B unregistered",
!checkState(testObjectNameC, RUNNING));
//now redeploy B, should also redeploy C
- deployService(testUrlB);
+ deploy(testUrlB);
//check deployment registered expected mbeans- all three should be
registered
assertTrue("test mbean A not registered after deploy of B",
getServer().isRegistered(testObjectNameA));
@@ -289,9 +289,9 @@
assertTrue("test mbean C not registered after deploy of B",
getServer().isRegistered(testObjectNameC));
//undeploy test xml doc.
- undeployService(testUrlC);
- undeployService(testUrlA);
- undeployService(testUrlB);
+ undeploy(testUrlC);
+ undeploy(testUrlA);
+ undeploy(testUrlB);
//check they aren't there any more
assertTrue("test mbean still registered after undeploy",
!getServer().isRegistered(testObjectNameA));
@@ -302,9 +302,9 @@
}
finally
{
- undeployService(testUrlC);
- undeployService(testUrlA);
- undeployService(testUrlB);
+ undeploy(testUrlC);
+ undeploy(testUrlA);
+ undeploy(testUrlB);
}
}
@@ -345,25 +345,25 @@
assertTrue("test mbean d already registered before deploy",
!getServer().isRegistered(testObjectNameD));
//deploy the test jsrs.
- deployService(testUrlD);
+ deploy(testUrlD);
assertTrue("test mbean D started with A, B, and C unregistered",
!checkState(testObjectNameD, RUNNING));
//deploy A.
- deployService(testUrlA);
+ deploy(testUrlA);
//A should be started, not anything else
assertTrue("test mbean A not started", checkState(testObjectNameA,
RUNNING));
assertTrue("test mbean D started with A, B, and C unregistered",
!checkState(testObjectNameD, RUNNING));
//Deploy C, should not start
- deployService(testUrlC);
+ deploy(testUrlC);
assertTrue("test mbean C started with B unregistered",
!checkState(testObjectNameC, RUNNING));
//deploy the test bean B. C and D should start too.
- deployService(testUrlB);
+ deploy(testUrlB);
assertTrue("test mbean A not started", checkState(testObjectNameA,
RUNNING));
assertTrue("test mbean B not started", checkState(testObjectNameB,
RUNNING));
assertTrue("test mbean C not started", checkState(testObjectNameC,
RUNNING));
@@ -371,14 +371,14 @@
//undeploy test xml doc.
- undeployService(testUrlA);
+ undeploy(testUrlA);
assertTrue("test mbean A present after undeploy",
!getServer().isRegistered(testObjectNameA));
assertTrue("test mbean B not started after undeploy of A",
checkState(testObjectNameB, RUNNING));
assertTrue("test mbean C started after undeploy of A",
!checkState(testObjectNameC, RUNNING));
assertTrue("test mbean D started after undeploy of A",
!checkState(testObjectNameD, RUNNING));
- undeployService(testUrlC);
- undeployService(testUrlB);
- undeployService(testUrlD);
+ undeploy(testUrlC);
+ undeploy(testUrlB);
+ undeploy(testUrlD);
//check they aren't there any more
Collection ds =
Arrays.asList((ObjectName[])getServer().getAttribute(serviceControllerName,
"Deployed"));
@@ -393,28 +393,28 @@
{
try
{
- undeployService(testUrlD);
+ undeploy(testUrlD);
}
catch (Exception e)
{
}
try
{
- undeployService(testUrlC);
+ undeploy(testUrlC);
}
catch (Exception e)
{
}
try
{
- undeployService(testUrlA);
+ undeploy(testUrlA);
}
catch (Exception e)
{
}
try
{
- undeployService(testUrlB);
+ undeploy(testUrlB);
}
catch (Exception e)
{
@@ -447,11 +447,11 @@
assertTrue("test mbean already registered before deploy",
!getServer().isRegistered(testObjectName));
//deploy C
- deployService(testUrl);
+ deploy(testUrl);
String base = (String)getServer().getAttribute(testObjectName, "BaseDir");
File f = new File(base + File.separator + "db" + File.separator +
"local-directory");
//local dir should still be there after undeploy.
- undeployService(testUrl);
+ undeploy(testUrl);
assertTrue("local-directory not found!", f.exists());
File[] subs = f.listFiles();
assertTrue("Subdir missing!", subs.length != 0);
@@ -459,7 +459,7 @@
//delete it, redeploy, check again - it might have been there before we
deployed.
recursiveDelete(f);
- deployService(testUrl);
+ deploy(testUrl);
assertTrue("local-directory not found!", f.exists());
subs = f.listFiles();
assertTrue("Subdir missing!", subs.length != 0);
@@ -467,7 +467,7 @@
}
finally
{
- undeployService(testUrl);
+ undeploy(testUrl);
} // end of finally
}
@@ -478,7 +478,7 @@
getLog().debug("testUrl is : " + testUrl);
//deploy sar
- deployService(testUrl);
+ deploy(testUrl);
try
{
//deploy service.xml with a nonexistent attribute to cause
@@ -488,7 +488,7 @@
ObjectName errorObjectName = new ObjectName("test:name=TestConfigError");
try
{
- deployService(errorUrl);
+ deploy(errorUrl);
} catch (Exception e)
{
//??
@@ -499,7 +499,7 @@
//the mbeans we are trying to deploy/undeploy
try
{
- undeployService(errorUrl);
+ undeploy(errorUrl);
} catch (Exception e)
@@ -509,16 +509,16 @@
try
{
- deployService(fixedUrl);
+ deploy(fixedUrl);
assertTrue("Corrected mbean is not registered!",
getServer().isRegistered(errorObjectName));
} finally
{
- undeployService(fixedUrl);
+ undeploy(fixedUrl);
} // end of try-catch
} finally
{
- undeployService(testUrl);
+ undeploy(testUrl);
} // end of try-catch
}
@@ -532,7 +532,7 @@
ObjectName crashName = new ObjectName("CrashTest:name=Crash");
//deploy sar
- deployService(testUrl);
+ deploy(testUrl);
try
{
assertTrue("dontcrash mbean is missing!",
getServer().isRegistered(dontCrashName));
@@ -541,13 +541,13 @@
assertTrue("dontcrash mbean is started!",
getServer().getAttribute(dontCrashName, "StateString").equals("Stopped"));
assertTrue("crash mbean is started!", getServer().getAttribute(crashName,
"StateString").equals("Stopped"));
- undeployService(testUrl);
+ undeploy(testUrl);
assertTrue("dontcrash mbean is registered!",
!getServer().isRegistered(dontCrashName));
assertTrue("crash mbean is registered!",
!getServer().isRegistered(crashName));
} finally
{
- undeployService(testUrl);
+ undeploy(testUrl);
} // end of try-catch
}
@@ -561,17 +561,17 @@
getLog().debug("testUrl is : " + testUrl);
ObjectName nullInfoName = new ObjectName("NullInfoTest:name=NullInfo");
//deploy sar
- deployService(testUrl);
+ deploy(testUrl);
try
{
- deployService(testUrl);
+ deploy(testUrl);
assertTrue("nullinfo mbean is registered!",
!getServer().isRegistered(nullInfoName));
} finally
{
try
{
- undeployService(testUrl);
+ undeploy(testUrl);
}
catch (Exception e)
{ } // end of catch
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development