[jboss-cvs] JBossAS SVN: r69608 - in trunk/testsuite/src: main/org/jboss/test/web/test and 1 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Feb 5 02:26:52 EST 2008


Author: emuckenhuber
Date: 2008-02-05 02:26:52 -0500 (Tue, 05 Feb 2008)
New Revision: 69608

Modified:
   trunk/testsuite/src/main/org/jboss/test/jmx/test/DeployServiceUnitTestCase.java
   trunk/testsuite/src/main/org/jboss/test/jmx/test/UndeployBrokenPackageUnitTestCase.java
   trunk/testsuite/src/main/org/jboss/test/web/test/EncXmlUnitTestCase.java
   trunk/testsuite/src/resources/jmx/loading/ext/application.xml
Log:
catching the correct Exception and typo

Modified: trunk/testsuite/src/main/org/jboss/test/jmx/test/DeployServiceUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/jmx/test/DeployServiceUnitTestCase.java	2008-02-05 07:25:49 UTC (rev 69607)
+++ trunk/testsuite/src/main/org/jboss/test/jmx/test/DeployServiceUnitTestCase.java	2008-02-05 07:26:52 UTC (rev 69608)
@@ -28,7 +28,7 @@
 import javax.management.ObjectName;
 import javax.management.ReflectionException;
 
-import org.jboss.deployment.IncompleteDeploymentException;
+import org.jboss.deployers.spi.DeploymentException;
 import org.jboss.test.JBossTestCase;
 
 /**
@@ -371,6 +371,11 @@
       ObjectName testObjectNameB = new ObjectName("test:name=TestDeployerB");
       ObjectName testObjectNameC = new ObjectName("test:name=TestDeployerC");
       ObjectName testObjectNameD = new ObjectName("test:name=TestDeployerD");
+      
+      undeploy(testUrlA);
+      undeploy(testUrlB);
+      undeploy(testUrlC);
+      undeploy(testUrlD);
       try
       {
          //check they aren't there already
@@ -386,7 +391,7 @@
             fail("D deployed without dependencies");
 
          }
-         catch (IncompleteDeploymentException e)
+         catch (DeploymentException e)
          {
             //expected
          } // end of try-catch
@@ -407,7 +412,7 @@
             deploy(testUrlC);
             fail("C deployed completely, D should still be waiting");
          }
-         catch (IncompleteDeploymentException e)
+         catch (DeploymentException e)
          {
             //expected
          } // end of try-catch
@@ -583,7 +588,6 @@
 
    }
 
-
    public void testCrashInStart() throws Exception
    //Thanks to David Budworth for this test.
    {
@@ -598,7 +602,7 @@
          deploy(testUrl);
          fail("expected IncompleteDeploymentException");
       }
-      catch (IncompleteDeploymentException e)
+      catch (DeploymentException e)
       {
          //expected
       } // end of try-catch
@@ -623,7 +627,6 @@
 
    }
 
-
    public void testNullInfoInDynamicMBean() throws Exception
    //Thanks to David Budworth for this test.
    //Tries to deploy a DynamicMBean that returns null from getMBeanInfo.
@@ -671,12 +674,18 @@
    {
       String testUrl = "entityref.sar";
       getLog().debug("testUrl is : " + testUrl);
-      //deploy sar
-      deploy(testUrl);
-      //check deployment registered expected mbeans
-      ObjectName name = new ObjectName("test:name=EntityRefTest");
-      assertTrue("test:name=EntityRefTest is registered after deploy", checkState(name, RUNNING));
-      undeploy(testUrl);
+      try
+      {
+         //deploy sar
+         deploy(testUrl);
+         //check deployment registered expected mbeans
+         ObjectName name = new ObjectName("test:name=EntityRefTest");
+         assertTrue("test:name=EntityRefTest is registered after deploy", checkState(name, RUNNING));
+      }
+      finally
+      {
+         undeploy(testUrl);   
+      }
    }
 
    /** Test that a sar deployment that has its service class in the default
@@ -686,24 +695,36 @@
    {
       String testUrl = "defaultpkg.sar";
       getLog().debug("testUrl is : " + testUrl);
-      //deploy sar
-      deploy(testUrl);
-      //check deployment registered expected mbeans
-      ObjectName name = new ObjectName("test:name=DefaultPkgService");
-      assertTrue("test:name=DefaultPkgService is registered after deploy", checkState(name, RUNNING));
-      undeploy(testUrl);
+      try
+      {
+         //deploy sar
+         deploy(testUrl);
+         //check deployment registered expected mbeans
+         ObjectName name = new ObjectName("test:name=DefaultPkgService");
+         assertTrue("test:name=DefaultPkgService is registered after deploy", checkState(name, RUNNING));
+      }
+      finally
+      {
+         undeploy(testUrl);
+      }
    }
 
    public void testExplicitStandardInterfaceService() throws Exception
    {
       String testUrl = "explicit-standard-interface.sar";
       getLog().debug("testUrl is : " + testUrl);
-      //deploy sar
-      deploy(testUrl);
-      //check deployment registered expected mbeans
-      ObjectName name = new ObjectName("test:name=TestStandardService");
-      assertTrue("test:name=TestStandardService is registered after deploy", checkState(name, RUNNING));
-      undeploy(testUrl);
+      try
+      {
+         //deploy sar
+         deploy(testUrl);
+         //check deployment registered expected mbeans
+         ObjectName name = new ObjectName("test:name=TestStandardService");
+         assertTrue("test:name=TestStandardService is registered after deploy", checkState(name, RUNNING));
+      }
+      finally
+      {
+         undeploy(testUrl);
+      }
    }
 
    protected boolean recursiveDelete(File f)

Modified: trunk/testsuite/src/main/org/jboss/test/jmx/test/UndeployBrokenPackageUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/jmx/test/UndeployBrokenPackageUnitTestCase.java	2008-02-05 07:25:49 UTC (rev 69607)
+++ trunk/testsuite/src/main/org/jboss/test/jmx/test/UndeployBrokenPackageUnitTestCase.java	2008-02-05 07:26:52 UTC (rev 69608)
@@ -31,8 +31,8 @@
 import org.jboss.test.jmx.eardeployment.a.interfaces.SessionAHome;
 import org.jboss.test.jmx.eardeployment.b.interfaces.SessionB;
 import org.jboss.test.jmx.eardeployment.b.interfaces.SessionBHome;
-import org.jboss.deployment.DeploymentException;
-import org.jboss.deployment.IncompleteDeploymentException;
+import org.jboss.deployers.client.spi.IncompleteDeploymentException;
+import org.jboss.deployers.spi.DeploymentException;
 import org.jboss.util.file.Files;
 
 /** Tests of reployment of bad deployment packages
@@ -64,7 +64,7 @@
             deploy(testPackage);
             fail("test package " + testPackage + " deployed successfully without needed datasource!");
          }
-         catch (IncompleteDeploymentException e)
+         catch (DeploymentException e)
          {
             log.info("caught exception as expected", e);
          } // end of try-catch
@@ -124,9 +124,16 @@
       String testPackage = "ejbredeploy.jar";
       // Move the bad jar into ejbredeploy.jar
       String deployDir = System.getProperty("jbosstest.deploy.dir");
+      if (deployDir == null)
+      {
+         deployDir = "output/lib";
+      }
       File thejar = new File(deployDir, "ejbredeploy.jar");
       File badjar = new File(deployDir, "ejbredeploy-bad.jar");
       File goodjar = new File(deployDir, "ejbredeploy-good.jar");
+      
+      assertTrue("badjar exists", badjar.exists());
+      assertTrue("goodjar exists", goodjar.exists());
 
       thejar.delete();
       Files.copy(badjar, thejar);

Modified: trunk/testsuite/src/main/org/jboss/test/web/test/EncXmlUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/web/test/EncXmlUnitTestCase.java	2008-02-05 07:25:49 UTC (rev 69607)
+++ trunk/testsuite/src/main/org/jboss/test/web/test/EncXmlUnitTestCase.java	2008-02-05 07:26:52 UTC (rev 69608)
@@ -44,7 +44,7 @@
    
    public static Test suite() throws Exception
    {
-      return getDeploySetup(EncXmlUnitTestCase.class, "simple-xmlonly.beans,simple-xmlonly.war");
+      return getDeploySetup(EncXmlUnitTestCase.class, "simple-mock.beans,simple-xmlonly.war");
    }
 
    public EncXmlUnitTestCase(String name)

Modified: trunk/testsuite/src/resources/jmx/loading/ext/application.xml
===================================================================
--- trunk/testsuite/src/resources/jmx/loading/ext/application.xml	2008-02-05 07:25:49 UTC (rev 69607)
+++ trunk/testsuite/src/resources/jmx/loading/ext/application.xml	2008-02-05 07:26:52 UTC (rev 69608)
@@ -6,5 +6,8 @@
 
 <application>
     <display-name>JBossTest ExternalClass sar EAR</display-name>
+    <module>
+    	<ejb>external.sar</ejb>
+    </module>
 </application>
 




More information about the jboss-cvs-commits mailing list