[jboss-cvs] JBossAS SVN: r72441 - trunk/testsuite/src/main/org/jboss/test/jmx/test.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Apr 18 08:07:52 EDT 2008


Author: adrian at jboss.org
Date: 2008-04-18 08:07:52 -0400 (Fri, 18 Apr 2008)
New Revision: 72441

Modified:
   trunk/testsuite/src/main/org/jboss/test/jmx/test/RedeployStressTestCase.java
Log:
Deploy the missing jms queues for this test

Modified: trunk/testsuite/src/main/org/jboss/test/jmx/test/RedeployStressTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/jmx/test/RedeployStressTestCase.java	2008-04-18 11:45:15 UTC (rev 72440)
+++ trunk/testsuite/src/main/org/jboss/test/jmx/test/RedeployStressTestCase.java	2008-04-18 12:07:52 UTC (rev 72441)
@@ -21,7 +21,13 @@
   */
 package org.jboss.test.jmx.test;
 
+import javax.management.ObjectName;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
 import org.jboss.test.JBossTestCase;
+import org.jboss.test.JBossTestSetup;
 
 /**
  * Stresses redeployment
@@ -32,6 +38,49 @@
 
 public class RedeployStressTestCase extends JBossTestCase
 {
+
+   /**
+    * Setup the test suite.
+    */
+   public static Test suite() throws Exception
+   {
+      TestSuite suite = new TestSuite();
+      suite.addTest(new TestSuite(RedeployStressTestCase.class));
+
+      // Create an initializer for the test suite
+      Test wrapper = new JBossTestSetup(suite)
+      {
+         protected void setUp() throws Exception
+         {
+            super.setUp();
+            ClassLoader loader = Thread.currentThread().getContextClassLoader();
+            deploy(loader.getResource("messaging/test-destinations-full-service.xml").toString());
+         }
+         protected void tearDown() throws Exception
+         {
+            try
+            {
+               // Remove all the messages created during this test
+               getServer().invoke
+               (
+                  new ObjectName("jboss.mq.destination:service=Queue,name=testQueue"),
+                  "removeAllMessages",
+                  new Object[0],
+                  new String[0]
+               );
+            }
+            catch(Exception e)
+            {
+            }
+            ClassLoader loader = Thread.currentThread().getContextClassLoader();
+            undeploy(loader.getResource("messaging/test-destinations-full-service.xml").toString());
+            super.tearDown();
+         
+         }
+      };
+      return wrapper;
+   }
+
    public RedeployStressTestCase(String name)
    {
       super(name);




More information about the jboss-cvs-commits mailing list