[jboss-cvs] JBoss Messaging SVN: r8626 - branches/Branch_1_4/tests/src/org/jboss/test/messaging/jms.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sun Apr 20 23:52:30 EDT 2014


Author: gaohoward
Date: 2014-04-20 23:52:29 -0400 (Sun, 20 Apr 2014)
New Revision: 8626

Modified:
   branches/Branch_1_4/tests/src/org/jboss/test/messaging/jms/DLQTest.java
Log:
JBMESSAGING-1951 DLQTest is unstable because of inappropriate cleanup



Modified: branches/Branch_1_4/tests/src/org/jboss/test/messaging/jms/DLQTest.java
===================================================================
--- branches/Branch_1_4/tests/src/org/jboss/test/messaging/jms/DLQTest.java	2014-03-14 07:36:21 UTC (rev 8625)
+++ branches/Branch_1_4/tests/src/org/jboss/test/messaging/jms/DLQTest.java	2014-04-21 03:52:29 UTC (rev 8626)
@@ -54,7 +54,38 @@
    }
 
    // Public --------------------------------------------------------
+   @Override
+   protected void tearDown() throws Exception
+   {
+      ObjectName serverPeerObjectName = ServerManagement.getServerPeerObjectName();
+      ServerManagement.setAttribute(serverPeerObjectName,
+                                    "DefaultDLQ",
+                                    "jboss.messaging.destination:service=Queue,name=DLQ");
+      String testQueue1ObjectName = "jboss.messaging.destination:service=Queue,name=Queue1";
+      ServerManagement.setAttribute(new ObjectName(testQueue1ObjectName),
+                                    "MaxDeliveryAttempts",
+                                    "-1");
+      String testQueue2ObjectName = "jboss.messaging.destination:service=Queue,name=Queue2";
+      ServerManagement.setAttribute(new ObjectName(testQueue2ObjectName),
+                                    "MaxDeliveryAttempts",
+                                    "-1");
+      String testQueue3ObjectName = "jboss.messaging.destination:service=Queue,name=Queue3";
+      ServerManagement.setAttribute(new ObjectName(testQueue3ObjectName),
+                                    "MaxDeliveryAttempts",
+                                    "-1");
+      String testQueue4ObjectName = "jboss.messaging.destination:service=Queue,name=Queue4";
+      ServerManagement.setAttribute(new ObjectName(testQueue4ObjectName),
+                                    "MaxDeliveryAttempts",
+                                    "-1");
 
+      String testTopic1ObjectName = "jboss.messaging.destination:service=Topic,name=Topic1";
+      ServerManagement.setAttribute(new ObjectName(testTopic1ObjectName),
+                                    "MaxDeliveryAttempts",
+                                    "-1");
+
+      super.tearDown();
+   }
+
    public void testDLQAlreadyDeployed() throws Exception
    {
       if (ServerManagement.isRemote())
@@ -370,7 +401,7 @@
          {
             for (int j = 0; j < NUM_MESSAGES; j++)
             {
-               TextMessage tm = (TextMessage)cons.receive(1000);
+               TextMessage tm = (TextMessage)cons.receive(5000);
 
                assertNotNull(tm);
 
@@ -741,7 +772,7 @@
          {
             for (int j = 0; j < NUM_MESSAGES; j++)
             {
-               TextMessage tm = (TextMessage)cons.receive(1000);
+               TextMessage tm = (TextMessage)cons.receive(5000);
 
                assertNotNull(tm);
 
@@ -841,7 +872,7 @@
          {
             for (int j = 0; j < NUM_MESSAGES; j++)
             {
-               TextMessage tm = (TextMessage)cons.receive(1000);
+               TextMessage tm = (TextMessage)cons.receive(5000);
 
                assertNotNull(tm);
 



More information about the jboss-cvs-commits mailing list