[jboss-cvs] JBoss Messaging SVN: r5260 - 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
Tue Nov 4 12:30:17 EST 2008
Author: clebert.suconic at jboss.com
Date: 2008-11-04 12:30:17 -0500 (Tue, 04 Nov 2008)
New Revision: 5260
Modified:
branches/Branch_1_4/tests/src/org/jboss/test/messaging/jms/ExpiryQueueTest.java
Log:
tweak on test
Modified: branches/Branch_1_4/tests/src/org/jboss/test/messaging/jms/ExpiryQueueTest.java
===================================================================
--- branches/Branch_1_4/tests/src/org/jboss/test/messaging/jms/ExpiryQueueTest.java 2008-11-04 17:00:22 UTC (rev 5259)
+++ branches/Branch_1_4/tests/src/org/jboss/test/messaging/jms/ExpiryQueueTest.java 2008-11-04 17:30:17 UTC (rev 5260)
@@ -47,11 +47,19 @@
// Constructors --------------------------------------------------
- public ExpiryQueueTest(String name)
+ public ExpiryQueueTest(final String name)
{
super(name);
}
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ // Most of these tests are time sensitive... trying to minimize GC on them
+ forceGC();
+ }
+
// Public --------------------------------------------------------
public void testExpiryQueueAlreadyDeployed() throws Exception
@@ -414,7 +422,7 @@
public void testWithReceivePersistent() throws Exception
{
- this.testWithReceive(true);
+ testWithReceive(true);
}
public void testWithReceiveNonPersistent() throws Exception
@@ -422,7 +430,7 @@
testWithReceive(false);
}
- public void testWithMessageListener(boolean persistent) throws Exception
+ public void testWithMessageListener(final boolean persistent) throws Exception
{
Connection conn = null;
@@ -499,11 +507,13 @@
ServerManagement.undeployQueue("ExpiryQueue");
if (conn != null)
+ {
conn.close();
+ }
}
}
- public void testWithReceive(boolean persistent) throws Exception
+ public void testWithReceive(final boolean persistent) throws Exception
{
Connection conn = null;
@@ -568,7 +578,9 @@
ServerManagement.undeployQueue("ExpiryQueue");
if (conn != null)
+ {
conn.close();
+ }
}
}
@@ -657,9 +669,11 @@
{
ServerManagement.deployQueue("DLQ0925_1");
ServerManagement.deployQueue("ExpiryQueue0925_1");
-
- ServerManagement.setAttribute(serverPeerObjectName, "DefaultExpiryQueue", "jboss.messaging.destination:service=Queue,name=DLQ0925_1");
+ ServerManagement.setAttribute(serverPeerObjectName,
+ "DefaultExpiryQueue",
+ "jboss.messaging.destination:service=Queue,name=DLQ0925_1");
+
ObjectName myQueue = ServerManagement.deployQueueWithDLQnExpiryQ(testQueueName, testDLQName, testExpiryQName);
ObjectName myTopic = ServerManagement.deployTopicWithDLQnExpiryQ(testTopicName, testDLQName, testExpiryQName);
ObjectName myDLQ = ServerManagement.deployQueueWithoutStart(testDLQName);
@@ -726,7 +740,9 @@
}
finally
{
- ServerManagement.setAttribute(serverPeerObjectName, "DefaultExpiryQueue", "jboss.messaging.destination:service=Queue,name=ExpiryQueue");
+ ServerManagement.setAttribute(serverPeerObjectName,
+ "DefaultExpiryQueue",
+ "jboss.messaging.destination:service=Queue,name=ExpiryQueue");
ServerManagement.undeployQueue("DLQ0925_1");
ServerManagement.undeployQueue("ExpiryQueue0925_1");
@@ -754,7 +770,7 @@
{
volatile int deliveryCount;
- public void onMessage(Message msg)
+ public void onMessage(final Message msg)
{
deliveryCount++;
More information about the jboss-cvs-commits
mailing list