[jboss-cvs] JBossAS SVN: r64516 - in trunk: messaging/src/etc/deploy/non-clustered and 5 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Aug 8 19:00:30 EDT 2007


Author: clebert.suconic at jboss.com
Date: 2007-08-08 19:00:30 -0400 (Wed, 08 Aug 2007)
New Revision: 64516

Removed:
   trunk/messaging/src/etc/deploy/clustered/
Modified:
   trunk/messaging/src/etc/deploy/non-clustered/destinations-service.xml
   trunk/testsuite/build.xml
   trunk/testsuite/src/main/org/jboss/test/jbossmessaging/perf/JMSPerfStressTestCase.java
   trunk/testsuite/src/main/org/jboss/test/jbossmessaging/perf/SendReplyPerfStressTestCase.java
   trunk/testsuite/src/main/org/jboss/test/jbossmessaging/ra/RaJMSSessionUnitTestCase.java
   trunk/testsuite/src/main/org/jboss/test/jbossmessaging/ra/RaQueueUnitTestCase.java
   trunk/testsuite/src/main/org/jboss/test/jbossmessaging/ra/RaSyncRecUnitTestCase.java
   trunk/testsuite/src/main/org/jboss/test/jbossmessaging/ra/RaTopicUnitTestCase.java
   trunk/testsuite/src/main/org/jboss/test/jbossmessaging/test/JBossJMSUnitTest.java
   trunk/testsuite/src/main/org/jboss/test/jbossmessaging/test/JBossSessionRecoverUnitTestCase.java
   trunk/testsuite/src/main/org/jboss/test/jbossmessaging/test/MessageBodyUnitTestCase.java
   trunk/testsuite/src/main/org/jboss/test/jbossmessaging/test/MessageTypesUnitTestCase.java
   trunk/testsuite/src/main/org/jboss/test/jbossmessaging/test/RollBackUnitTestCase.java
   trunk/testsuite/src/main/org/jboss/test/jbossmessaging/test/SecurityUnitTestCase.java
   trunk/testsuite/src/main/org/jboss/test/jbossmessaging/test/UnackedUnitTestCase.java
   trunk/testsuite/src/main/org/jboss/test/jbossmessaging/test/XAResourceUnitTestCase.java
   trunk/testsuite/src/resources/jbossmessaging/test-destinations-full-service.xml
Log:
JBAS-4594 - Fix on JBossMessaging tests

Modified: trunk/messaging/src/etc/deploy/non-clustered/destinations-service.xml
===================================================================
--- trunk/messaging/src/etc/deploy/non-clustered/destinations-service.xml	2007-08-08 22:45:51 UTC (rev 64515)
+++ trunk/messaging/src/etc/deploy/non-clustered/destinations-service.xml	2007-08-08 23:00:30 UTC (rev 64516)
@@ -30,170 +30,5 @@
       <depends>jboss.messaging:service=PostOffice</depends>
    </mbean>   
 
-   <!--
-        Example destinations.
-   -->
 
-   <mbean code="org.jboss.jms.server.destination.TopicService"
-      name="jboss.messaging.destination:service=Topic,name=testTopic"
-      xmbean-dd="xmdesc/Topic-xmbean.xml">
-      <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-      <depends>jboss.messaging:service=PostOffice</depends>
-      <attribute name="SecurityConfig">
-         <security>
-            <role name="guest" read="true" write="true"/>
-            <role name="publisher" read="true" write="true" create="false"/>
-            <role name="durpublisher" read="true" write="true" create="true"/>
-         </security>
-      </attribute>
-   </mbean>
-
-   <mbean code="org.jboss.jms.server.destination.TopicService"
-      name="jboss.messaging.destination:service=Topic,name=securedTopic"
-      xmbean-dd="xmdesc/Topic-xmbean.xml">
-      <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-      <depends>jboss.messaging:service=PostOffice</depends>
-      <attribute name="SecurityConfig">
-         <security>
-            <role name="publisher" read="true" write="true" create="false"/>
-         </security>
-      </attribute>
-   </mbean>
-
-   <mbean code="org.jboss.jms.server.destination.TopicService"
-      name="jboss.messaging.destination:service=Topic,name=testDurableTopic"
-      xmbean-dd="xmdesc/Topic-xmbean.xml">
-      <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-      <depends>jboss.messaging:service=PostOffice</depends>
-      <attribute name="SecurityConfig">
-         <security>
-            <role name="guest" read="true" write="true"/>
-            <role name="publisher" read="true" write="true" create="false"/>
-            <role name="durpublisher" read="true" write="true" create="true"/>
-         </security>
-      </attribute>
-   </mbean>
-
-   <mbean code="org.jboss.jms.server.destination.QueueService"
-      name="jboss.messaging.destination:service=Queue,name=testQueue"
-      xmbean-dd="xmdesc/Queue-xmbean.xml">
-      <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-      <depends>jboss.messaging:service=PostOffice</depends>
-      <attribute name="SecurityConfig">
-         <security>
-            <role name="guest" read="true" write="true"/>
-            <role name="publisher" read="true" write="true" create="false"/>
-            <role name="noacc" read="false" write="false" create="false"/>
-         </security>
-      </attribute>
-   </mbean>
-
-   <mbean code="org.jboss.jms.server.destination.QueueService"
-      name="jboss.messaging.destination:service=Queue,name=A"
-      xmbean-dd="xmdesc/Queue-xmbean.xml">
-      <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-      <depends>jboss.messaging:service=PostOffice</depends>
-   </mbean>
-
-   <mbean code="org.jboss.jms.server.destination.QueueService"
-      name="jboss.messaging.destination:service=Queue,name=B"
-      xmbean-dd="xmdesc/Queue-xmbean.xml">
-      <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-      <depends>jboss.messaging:service=PostOffice</depends>
-   </mbean>
-
-   <mbean code="org.jboss.jms.server.destination.QueueService"
-      name="jboss.messaging.destination:service=Queue,name=C"
-      xmbean-dd="xmdesc/Queue-xmbean.xml">
-      <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-      <depends>jboss.messaging:service=PostOffice</depends>
-   </mbean>
-
-   <mbean code="org.jboss.jms.server.destination.QueueService"
-      name="jboss.messaging.destination:service=Queue,name=D"
-      xmbean-dd="xmdesc/Queue-xmbean.xml">
-      <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-      <depends>jboss.messaging:service=PostOffice</depends>
-   </mbean>
-
-   <mbean code="org.jboss.jms.server.destination.QueueService"
-      name="jboss.messaging.destination:service=Queue,name=ex"
-      xmbean-dd="xmdesc/Queue-xmbean.xml">
-      <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-      <depends>jboss.messaging:service=PostOffice</depends>
-   </mbean>
-   
-   <!-- It's possible for indiviual queues and topics to use a specific queue for
-   an expiry or DLQ -->
-   
-   <mbean code="org.jboss.jms.server.destination.QueueService"
-      name="jboss.messaging.destination:service=Queue,name=PrivateDLQ"
-      xmbean-dd="xmdesc/Queue-xmbean.xml">
-      <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-      <depends>jboss.messaging:service=PostOffice</depends>
-   </mbean>
-   
-   <mbean code="org.jboss.jms.server.destination.QueueService"
-      name="jboss.messaging.destination:service=Queue,name=PrivateExpiryQueue"
-      xmbean-dd="xmdesc/Queue-xmbean.xml">
-      <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-      <depends>jboss.messaging:service=PostOffice</depends>
-   </mbean>      
-   
-   <mbean code="org.jboss.jms.server.destination.QueueService"
-      name="jboss.messaging.destination:service=Queue,name=QueueWithOwnDLQAndExpiryQueue"
-      xmbean-dd="xmdesc/Queue-xmbean.xml">
-      <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-      <depends>jboss.messaging:service=PostOffice</depends>
-      <attribute name="DLQ">jboss.messaging.destination:service=Queue,name=PrivateDLQ</attribute>
-      <attribute name="ExpiryQueue">jboss.messaging.destination:service=Queue,name=PrivateExpiryQueue</attribute>
-   </mbean> 
-   
-   <mbean code="org.jboss.jms.server.destination.TopicService"
-      name="jboss.messaging.destination:service=Topic,name=TopicWithOwnDLQAndExpiryQueue"
-      xmbean-dd="xmdesc/Topic-xmbean.xml">
-      <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-      <depends>jboss.messaging:service=PostOffice</depends>
-      <attribute name="DLQ">jboss.messaging.destination:service=Queue,name=PrivateDLQ</attribute>
-      <attribute name="ExpiryQueue">jboss.messaging.destination:service=Queue,name=PrivateExpiryQueue</attribute>
-   </mbean>       
-   
-   <!-- Queues and Topics can also specify their own redelivery delay -->
-   
-   <mbean code="org.jboss.jms.server.destination.QueueService"
-      name="jboss.messaging.destination:service=Queue,name=QueueWithOwnRedeliveryDelay"
-      xmbean-dd="xmdesc/Queue-xmbean.xml">
-      <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-      <depends>jboss.messaging:service=PostOffice</depends>
-      <attribute name="RedeliveryDelay">5000</attribute>
-   </mbean>
-   
-   <mbean code="org.jboss.jms.server.destination.TopicService"
-      name="jboss.messaging.destination:service=Topic,name=TopicWithOwnRedeliveryDelay"
-      xmbean-dd="xmdesc/Topic-xmbean.xml">
-      <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-      <depends>jboss.messaging:service=PostOffice</depends>
-      <attribute name="RedeliveryDelay">5000</attribute>
-   </mbean>     
-   
-   <!--
-        Example clustered destinations.
-   -->
-   
-   <mbean code="org.jboss.jms.server.destination.QueueService"
-      name="jboss.messaging.destination:service=Queue,name=testDistributedQueue"
-      xmbean-dd="xmdesc/Queue-xmbean.xml">
-      <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-      <depends>jboss.messaging:service=PostOffice</depends>
-      <attribute name="Clustered">true</attribute>
-   </mbean>   
-   
-   <mbean code="org.jboss.jms.server.destination.TopicService"
-      name="jboss.messaging.destination:service=Topic,name=testDistributedTopic"
-      xmbean-dd="xmdesc/Topic-xmbean.xml">
-      <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-      <depends>jboss.messaging:service=PostOffice</depends>
-      <attribute name="Clustered">true</attribute>
-   </mbean>   
-
 </server>
\ No newline at end of file

Modified: trunk/testsuite/build.xml
===================================================================
--- trunk/testsuite/build.xml	2007-08-08 22:45:51 UTC (rev 64515)
+++ trunk/testsuite/build.xml	2007-08-08 23:00:30 UTC (rev 64516)
@@ -2874,12 +2874,6 @@
    <target name="tests-jbossmessaging"
       description="Run JMS tests against the Messaging JMS provider">
 
-   	  <!-- unpack the integration tests from jms-integration-tests, packed as thirdparty libraries -->
-   	  <unzip src="${jboss.jms.integration.tests.lib}/jms-integration-tests.jar" dest="${build.classes}"/>
-   	  <copy todir="${build.lib}">
-   	  	<fileset dir="${jboss.jms.integration.tests.lib}"/>
-   	  </copy>
-
       <!-- Create a scoped Messaging server config -->
       <!-- <ant antfile="${jboss.messaging.resources}/release-admin.xml" -->
       <!--     target="create-server-config"> -->

Modified: trunk/testsuite/src/main/org/jboss/test/jbossmessaging/perf/JMSPerfStressTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/jbossmessaging/perf/JMSPerfStressTestCase.java	2007-08-08 22:45:51 UTC (rev 64515)
+++ trunk/testsuite/src/main/org/jboss/test/jbossmessaging/perf/JMSPerfStressTestCase.java	2007-08-08 23:00:30 UTC (rev 64516)
@@ -41,6 +41,8 @@
 import javax.jms.Queue;
 import javax.naming.Context;
 
+import junit.framework.Test;
+
 import org.jboss.logging.Logger;
 import org.jboss.test.jbossmessaging.JMSTestCase;
 /**
@@ -787,4 +789,11 @@
       session.close();
    }
 
+   public static Test suite() throws Exception
+   {
+       ClassLoader loader = Thread.currentThread().getContextClassLoader();
+       return getDeploySetup(JMSPerfStressTestCase.class,
+               loader.getResource("jbossmessaging/test-destinations-service.xml").toString());
+   }
+
 }

Modified: trunk/testsuite/src/main/org/jboss/test/jbossmessaging/perf/SendReplyPerfStressTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/jbossmessaging/perf/SendReplyPerfStressTestCase.java	2007-08-08 22:45:51 UTC (rev 64515)
+++ trunk/testsuite/src/main/org/jboss/test/jbossmessaging/perf/SendReplyPerfStressTestCase.java	2007-08-08 23:00:30 UTC (rev 64516)
@@ -41,6 +41,8 @@
 import javax.jms.Queue;
 import javax.naming.Context;
 
+import junit.framework.Test;
+
 import org.jboss.test.jbossmessaging.JMSTestCase;
 
 /**
@@ -332,5 +334,13 @@
       queueConnection.stop();
 
    }
+   
+   public static Test suite() throws Exception
+   {
+       ClassLoader loader = Thread.currentThread().getContextClassLoader();
+       return getDeploySetup(SendReplyPerfStressTestCase.class,
+               loader.getResource("jbossmessaging/test-destinations-service.xml").toString());
+   }
+   
 
 }

Modified: trunk/testsuite/src/main/org/jboss/test/jbossmessaging/ra/RaJMSSessionUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/jbossmessaging/ra/RaJMSSessionUnitTestCase.java	2007-08-08 22:45:51 UTC (rev 64515)
+++ trunk/testsuite/src/main/org/jboss/test/jbossmessaging/ra/RaJMSSessionUnitTestCase.java	2007-08-08 23:00:30 UTC (rev 64516)
@@ -62,16 +62,19 @@
       
       suite.addTest(new JBossTestSetup(new TestSuite(RaJMSSessionUnitTestCase.class))
       {
-         protected void setUp() throws Exception
-         {
-            super.setUp();
-            deploy ("jmsra.jar");
-         }
-         protected void tearDown() throws Exception
-         {
-            undeploy ("jmsra.jar");
-            super.tearDown();
-         }
+          protected void setUp() throws Exception
+          {
+             super.setUp();
+             ClassLoader loader = Thread.currentThread().getContextClassLoader();
+             deploy (loader.getResource("messaging/test-destinations-service.xml").toString());
+             deploy ("jmsra.jar");
+          }
+          protected void tearDown() throws Exception
+          {
+             ClassLoader loader = Thread.currentThread().getContextClassLoader();
+             undeploy ("jmsra.jar");
+             undeploy (loader.getResource("messaging/test-destinations-service.xml").toString());
+          }
       });
 
       return suite;

Modified: trunk/testsuite/src/main/org/jboss/test/jbossmessaging/ra/RaQueueUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/jbossmessaging/ra/RaQueueUnitTestCase.java	2007-08-08 22:45:51 UTC (rev 64515)
+++ trunk/testsuite/src/main/org/jboss/test/jbossmessaging/ra/RaQueueUnitTestCase.java	2007-08-08 23:00:30 UTC (rev 64516)
@@ -37,6 +37,7 @@
 
 import org.jboss.test.JBossTestSetup;
 
+
 /**
  * Test cases for JMS Resource Adapter use a <em>Queue</em> . <p>
  *
@@ -86,7 +87,31 @@
 
    public static Test suite() throws Exception
    {
-      return getDeploySetup(RaQueueUnitTestCase.class, "jmsra.jar");
+	      return new JBossTestSetup(getDeploySetup(RaQueueUnitTestCase.class, "jmsra.jar"))
+	         {
+	            protected void setUp() throws Exception
+	            {
+	               super.setUp();
+	               ClassLoader loader = Thread.currentThread().getContextClassLoader();
+	               deploy (loader.getResource("jbossmessaging/test-destinations-service.xml").toString());
+	            }
+
+	             protected void tearDown() throws Exception
+	             {
+	                super.tearDown();
+
+	                // Remove the messages
+	                getServer().invoke
+	                (
+	                   new ObjectName("jboss.messaging.destination:service=Queue,name=testQueue"),
+	                   "removeAllMessages",
+	                   new Object[0],
+	                   new String[0]
+	                );
+	                ClassLoader loader = Thread.currentThread().getContextClassLoader();
+	                undeploy (loader.getResource("jbossmessaging/test-destinations-service.xml").toString());
+	             }
+	          };
    }
 
 

Modified: trunk/testsuite/src/main/org/jboss/test/jbossmessaging/ra/RaSyncRecUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/jbossmessaging/ra/RaSyncRecUnitTestCase.java	2007-08-08 22:45:51 UTC (rev 64515)
+++ trunk/testsuite/src/main/org/jboss/test/jbossmessaging/ra/RaSyncRecUnitTestCase.java	2007-08-08 23:00:30 UTC (rev 64516)
@@ -35,7 +35,6 @@
 
 import javax.management.ObjectName;
 
-import javax.naming.InitialContext;
 import junit.framework.Assert;
 
 import junit.framework.Test;
@@ -183,7 +182,32 @@
 
    public static Test suite() throws Exception
    {
-      return getDeploySetup(RaSyncRecUnitTestCase.class, "jmsra.jar");
+      return new JBossTestSetup(getDeploySetup(RaSyncRecUnitTestCase.class, "jmsra.jar"))
+      {
+         protected void setUp() throws Exception
+         {
+            super.setUp();
+            ClassLoader loader = Thread.currentThread().getContextClassLoader();
+            deploy (loader.getResource("jbossmessaging/test-destinations-full-service.xml").toString());
+         }
+
+          protected void tearDown() throws Exception
+          {
+             super.tearDown();
+
+             // Remove the messages
+             getServer().invoke
+             (
+                new ObjectName("jboss.messaging.destination:service=Queue,name=testQueue"),
+                "removeAllMessages",
+                new Object[0],
+                new String[0]
+             );
+             ClassLoader loader = Thread.currentThread().getContextClassLoader();
+             undeploy (loader.getResource("jbossmessaging/test-destinations-full-service.xml").toString());
+          }
+       };
+      
    }
 } // RaSyncRecUnitTestCase
 

Modified: trunk/testsuite/src/main/org/jboss/test/jbossmessaging/ra/RaTopicUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/jbossmessaging/ra/RaTopicUnitTestCase.java	2007-08-08 22:45:51 UTC (rev 64515)
+++ trunk/testsuite/src/main/org/jboss/test/jbossmessaging/ra/RaTopicUnitTestCase.java	2007-08-08 23:00:30 UTC (rev 64516)
@@ -37,6 +37,7 @@
 
 import org.jboss.test.JBossTestSetup;
 
+
 /**
  * Test cases for JMS Resource Adapter using a <em>Topic</em> . <p>
  *
@@ -86,7 +87,31 @@
 
    public static Test suite() throws Exception
    {
-      return getDeploySetup(RaQueueUnitTestCase.class, "jmsra.jar");
+	      return new JBossTestSetup(getDeploySetup(RaTopicUnitTestCase.class, "jmsra.jar"))
+	         {
+	            protected void setUp() throws Exception
+	            {
+	               super.setUp();
+	               ClassLoader loader = Thread.currentThread().getContextClassLoader();
+	               deploy (loader.getResource("jbossmessaging/test-destinations-service.xml").toString());
+	            }
+
+	             protected void tearDown() throws Exception
+	             {
+	                super.tearDown();
+
+	                // Remove the messages
+	                getServer().invoke
+	                (
+	                   new ObjectName("jboss.messaging.destination:service=Queue,name=testQueue"),
+	                   "removeAllMessages",
+	                   new Object[0],
+	                   new String[0]
+	                );
+	                ClassLoader loader = Thread.currentThread().getContextClassLoader();
+	                undeploy (loader.getResource("jbossmessaging/test-destinations-service.xml").toString());
+	             }
+	          };
    }
 
 

Modified: trunk/testsuite/src/main/org/jboss/test/jbossmessaging/test/JBossJMSUnitTest.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/jbossmessaging/test/JBossJMSUnitTest.java	2007-08-08 22:45:51 UTC (rev 64515)
+++ trunk/testsuite/src/main/org/jboss/test/jbossmessaging/test/JBossJMSUnitTest.java	2007-08-08 23:00:30 UTC (rev 64516)
@@ -1352,4 +1352,12 @@
          }
       }
    }
+   
+   public static junit.framework.Test suite() throws Exception
+   {
+       ClassLoader loader = Thread.currentThread().getContextClassLoader();
+       return getDeploySetup(JBossJMSUnitTest.class,
+               loader.getResource("jbossmessaging/test-destinations-service.xml").toString());
+   }
+
 }

Modified: trunk/testsuite/src/main/org/jboss/test/jbossmessaging/test/JBossSessionRecoverUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/jbossmessaging/test/JBossSessionRecoverUnitTestCase.java	2007-08-08 22:45:51 UTC (rev 64515)
+++ trunk/testsuite/src/main/org/jboss/test/jbossmessaging/test/JBossSessionRecoverUnitTestCase.java	2007-08-08 23:00:30 UTC (rev 64516)
@@ -552,4 +552,11 @@
       getLog().debug("session.recover() receiveNoWait passed");
    }
 
+   public static junit.framework.Test suite() throws Exception
+   {
+       ClassLoader loader = Thread.currentThread().getContextClassLoader();
+       return getDeploySetup(JBossSessionRecoverUnitTestCase.class,
+               loader.getResource("jbossmessaging/test-destinations-service.xml").toString());
+   }
+
 }

Modified: trunk/testsuite/src/main/org/jboss/test/jbossmessaging/test/MessageBodyUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/jbossmessaging/test/MessageBodyUnitTestCase.java	2007-08-08 22:45:51 UTC (rev 64515)
+++ trunk/testsuite/src/main/org/jboss/test/jbossmessaging/test/MessageBodyUnitTestCase.java	2007-08-08 23:00:30 UTC (rev 64516)
@@ -37,6 +37,8 @@
 import javax.jms.TextMessage;
 import javax.naming.Context;
 
+import junit.framework.Test;
+
 import org.jboss.logging.Logger;
 import org.jboss.test.jbossmessaging.JMSTestCase;
 
@@ -113,6 +115,8 @@
    {
       queueConnection.close();
    }
+   
+   
 
    private void drainQueue() throws Exception
    {
@@ -337,4 +341,11 @@
       message.setShortProperty("JMS_JBOSS_REDELIVERY_LIMIT", (short)1);
    } */
 
+   public static Test suite() throws Exception
+   {
+       ClassLoader loader = Thread.currentThread().getContextClassLoader();
+       return getDeploySetup(MessageBodyUnitTestCase.class,
+               loader.getResource("jbossmessaging/test-destinations-service.xml").toString());
+   }
+
 }

Modified: trunk/testsuite/src/main/org/jboss/test/jbossmessaging/test/MessageTypesUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/jbossmessaging/test/MessageTypesUnitTestCase.java	2007-08-08 22:45:51 UTC (rev 64515)
+++ trunk/testsuite/src/main/org/jboss/test/jbossmessaging/test/MessageTypesUnitTestCase.java	2007-08-08 23:00:30 UTC (rev 64516)
@@ -40,6 +40,8 @@
 import javax.naming.Context;
 import javax.naming.InitialContext;
 
+import junit.framework.Test;
+
 import org.jboss.test.jbossmessaging.JMSTestCase;
 
 /**
@@ -264,4 +266,11 @@
       return out;
    }
 
+   public static Test suite() throws Exception
+   {
+       ClassLoader loader = Thread.currentThread().getContextClassLoader();
+       return getDeploySetup(MessageTypesUnitTestCase.class,
+               loader.getResource("jbossmessaging/test-destinations-service.xml").toString());
+   }
+
 }

Modified: trunk/testsuite/src/main/org/jboss/test/jbossmessaging/test/RollBackUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/jbossmessaging/test/RollBackUnitTestCase.java	2007-08-08 22:45:51 UTC (rev 64515)
+++ trunk/testsuite/src/main/org/jboss/test/jbossmessaging/test/RollBackUnitTestCase.java	2007-08-08 23:00:30 UTC (rev 64516)
@@ -40,6 +40,9 @@
 import javax.jms.TopicSubscriber;
 import javax.jms.Queue;
 import javax.naming.Context;
+
+import junit.framework.Test;
+
 import org.jboss.logging.Logger;
 
 
@@ -727,4 +730,11 @@
       return 5;
    }
 
+   public static Test suite() throws Exception
+   {
+       ClassLoader loader = Thread.currentThread().getContextClassLoader();
+       return getDeploySetup(RollBackUnitTestCase.class,
+               loader.getResource("jbossmessaging/test-destinations-service.xml").toString());
+   }
+   
 }

Modified: trunk/testsuite/src/main/org/jboss/test/jbossmessaging/test/SecurityUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/jbossmessaging/test/SecurityUnitTestCase.java	2007-08-08 22:45:51 UTC (rev 64515)
+++ trunk/testsuite/src/main/org/jboss/test/jbossmessaging/test/SecurityUnitTestCase.java	2007-08-08 23:00:30 UTC (rev 64516)
@@ -649,6 +649,8 @@
          sleep(1000L);
          Exception ex = sub1.getException();
          t1.interrupt();
+         
+         assertNotNull("No exception received", ex);
          Assert.assertTrue("Unautz topic subscriber throw wrong exception: " + ex,
                ex instanceof javax.jms.JMSSecurityException);
       }
@@ -1167,5 +1169,11 @@
          }
       }
    }
+   public static Test suite() throws Exception
+   {
+       ClassLoader loader = Thread.currentThread().getContextClassLoader();
+       return getDeploySetup(SecurityUnitTestCase.class,
+               loader.getResource("jbossmessaging/test-destinations-service.xml").toString());
+   }
 
 }

Modified: trunk/testsuite/src/main/org/jboss/test/jbossmessaging/test/UnackedUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/jbossmessaging/test/UnackedUnitTestCase.java	2007-08-08 22:45:51 UTC (rev 64515)
+++ trunk/testsuite/src/main/org/jboss/test/jbossmessaging/test/UnackedUnitTestCase.java	2007-08-08 23:00:30 UTC (rev 64516)
@@ -82,9 +82,12 @@
       suite.addTest(new UnackedUnitTestCase("testUnackedDurableTopic"));
       suite.addTest(new UnackedUnitTestCase("testDummyLast"));
       
-      return suite;
+      ClassLoader loader = Thread.currentThread().getContextClassLoader();
+
+      return getDeploySetup(suite, loader.getResource("jbossmessaging/test-destinations-service.xml").toString());
    }
-   
+
+
    /**
     * Constructor the test
     *

Modified: trunk/testsuite/src/main/org/jboss/test/jbossmessaging/test/XAResourceUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/jbossmessaging/test/XAResourceUnitTestCase.java	2007-08-08 22:45:51 UTC (rev 64515)
+++ trunk/testsuite/src/main/org/jboss/test/jbossmessaging/test/XAResourceUnitTestCase.java	2007-08-08 23:00:30 UTC (rev 64516)
@@ -34,6 +34,8 @@
 import javax.transaction.xa.XAResource;
 import javax.transaction.xa.Xid;
 
+import junit.framework.Test;
+
 import org.jboss.test.jbossmessaging.JMSTestCase;
 
 /**
@@ -198,4 +200,12 @@
          return branch;
       }
    }
+
+   public static Test suite() throws Exception
+   {
+       ClassLoader loader = Thread.currentThread().getContextClassLoader();
+       return getDeploySetup(XAResourceUnitTestCase.class,
+               loader.getResource("jbossmessaging/test-destinations-service.xml").toString());
+   }
+
 }

Modified: trunk/testsuite/src/resources/jbossmessaging/test-destinations-full-service.xml
===================================================================
--- trunk/testsuite/src/resources/jbossmessaging/test-destinations-full-service.xml	2007-08-08 22:45:51 UTC (rev 64515)
+++ trunk/testsuite/src/resources/jbossmessaging/test-destinations-full-service.xml	2007-08-08 23:00:30 UTC (rev 64516)
@@ -2,23 +2,26 @@
 
 <server>
 
-  <mbean code="org.jboss.jms.server.destination.TopicService"
-         name="jboss.messaging.destination:service=Topic,name=testTopic"
-         xmbean-dd="xmdesc/Topic-xmbean.xml">
-     <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-     <attribute name="SecurityConfig">
-        <security>
-           <role name="guest" read="true" write="true"/>
-           <role name="publisher" read="true" write="true" create="false"/>
-           <role name="durpublisher" read="true" write="true" create="true"/>
-        </security>
-     </attribute>
-  </mbean>
+   <mbean code="org.jboss.jms.server.destination.TopicService"
+      name="jboss.messaging.destination:service=Topic,name=testTopic"
+      xmbean-dd="xmdesc/Topic-xmbean.xml">
+      <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+      <depends>jboss.messaging:service=PostOffice</depends>
+      <attribute name="SecurityConfig">
+         <security>
+            <role name="guest" read="true" write="true"/>
+            <role name="publisher" read="true" write="true" create="false"/>
+            <role name="durpublisher" read="true" write="true" create="true"/>
+         </security>
+      </attribute>
+   </mbean>
+  
 
   <mbean code="org.jboss.jms.server.destination.TopicService"
          name="jboss.messaging.destination:service=Topic,name=securedTopic"
          xmbean-dd="xmdesc/Topic-xmbean.xml">
      <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+      <depends>jboss.messaging:service=PostOffice</depends>
      <attribute name="SecurityConfig">
         <security>
            <role name="publisher" read="true" write="true" create="false"/>
@@ -30,6 +33,7 @@
          name="jboss.messaging.destination:service=Topic,name=testDurableTopic"
          xmbean-dd="xmdesc/Topic-xmbean.xml">
      <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+      <depends>jboss.messaging:service=PostOffice</depends>
      <attribute name="SecurityConfig">
         <security>
            <role name="guest" read="true" write="true"/>
@@ -44,6 +48,7 @@
          name="jboss.messaging.destination:service=Queue,name=testQueue"
          xmbean-dd="xmdesc/Queue-xmbean.xml">
      <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+      <depends>jboss.messaging:service=PostOffice</depends>
      <attribute name="SecurityConfig">
         <security>
            <role name="guest" read="true" write="true"/>
@@ -56,18 +61,21 @@
   <mbean code="org.jboss.jms.server.destination.QueueService"
          name="jboss.messaging.destination:service=Queue,name=A"
          xmbean-dd="xmdesc/Queue-xmbean.xml">
+      <depends>jboss.messaging:service=PostOffice</depends>
      <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
   </mbean>
 
   <mbean code="org.jboss.jms.server.destination.QueueService"
          name="jboss.messaging.destination:service=Queue,name=B"
          xmbean-dd="xmdesc/Queue-xmbean.xml">
+      <depends>jboss.messaging:service=PostOffice</depends>
      <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
   </mbean>
 
   <mbean code="org.jboss.jms.server.destination.QueueService"
          name="jboss.messaging.destination:service=Queue,name=C"
          xmbean-dd="xmdesc/Queue-xmbean.xml">
+      <depends>jboss.messaging:service=PostOffice</depends>
      <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
   </mbean>
 
@@ -75,12 +83,14 @@
          name="jboss.messaging.destination:service=Queue,name=D"
          xmbean-dd="xmdesc/Queue-xmbean.xml">
      <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+      <depends>jboss.messaging:service=PostOffice</depends>
   </mbean>
 
   <mbean code="org.jboss.jms.server.destination.QueueService"
          name="jboss.messaging.destination:service=Queue,name=ex"
          xmbean-dd="xmdesc/Queue-xmbean.xml">
      <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+      <depends>jboss.messaging:service=PostOffice</depends>
   </mbean>
 
 </server>




More information about the jboss-cvs-commits mailing list