Author: ataylor
Date: 2011-12-05 04:45:18 -0500 (Mon, 05 Dec 2011)
New Revision: 11822
Modified:
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/client/ProducerFlowControlTest.java
Log:
stop server after resources to avoid reconnect retries
Modified:
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/client/ProducerFlowControlTest.java
===================================================================
---
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/client/ProducerFlowControlTest.java 2011-12-05
09:40:04 UTC (rev 11821)
+++
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/client/ProducerFlowControlTest.java 2011-12-05
09:45:18 UTC (rev 11822)
@@ -76,13 +76,14 @@
@Override
protected void tearDown() throws Exception
{
- stopComponent(server);
if (sf != null)
{
sf.close();
}
closeServerLocator(locator);
+ stopComponent(server);
+
super.tearDown();
}
@@ -535,29 +536,29 @@
sf = locator.createSessionFactory();
- session = sf.createSession(false, true, true, true);
+ session = sf.createSession(false, true, true, true);
- session.createQueue("address", "queue1", null, false);
+ session.createQueue("address", "queue1", null, false);
- ClientProducerCredits credits = null;
+ ClientProducerCredits credits = null;
- for (int i = 0; i <
ClientProducerCreditManagerImpl.MAX_UNREFERENCED_CREDITS_CACHE_SIZE * 2; i++)
- {
- ClientProducer prod = session.createProducer("address");
+ for (int i = 0; i <
ClientProducerCreditManagerImpl.MAX_UNREFERENCED_CREDITS_CACHE_SIZE * 2; i++)
+ {
+ ClientProducer prod = session.createProducer("address");
- ClientProducerCredits newCredits =
((ClientProducerInternal)prod).getProducerCredits();
+ ClientProducerCredits newCredits =
((ClientProducerInternal)prod).getProducerCredits();
- if (credits != null)
- {
- Assert.assertTrue(newCredits == credits);
- }
+ if (credits != null)
+ {
+ Assert.assertTrue(newCredits == credits);
+ }
- credits = newCredits;
+ credits = newCredits;
- Assert.assertEquals(1,
((ClientSessionInternal)session).getProducerCreditManager().creditsMapSize());
- Assert.assertEquals(0,
((ClientSessionInternal)session).getProducerCreditManager()
-
.unReferencedCreditsSize());
- }
+ Assert.assertEquals(1,
((ClientSessionInternal)session).getProducerCreditManager().creditsMapSize());
+ Assert.assertEquals(0,
((ClientSessionInternal)session).getProducerCreditManager()
+
.unReferencedCreditsSize());
+ }
}
public void testProducerCreditsCaching2() throws Exception