Author: clebert.suconic(a)jboss.com
Date: 2012-01-02 13:10:29 -0500 (Mon, 02 Jan 2012)
New Revision: 11946
Modified:
branches/Branch_2_2_AS7/tests/src/org/hornetq/tests/integration/jms/server/JMSServerStartStopTest.java
Log:
Merge changes from EAP branch
Modified:
branches/Branch_2_2_AS7/tests/src/org/hornetq/tests/integration/jms/server/JMSServerStartStopTest.java
===================================================================
---
branches/Branch_2_2_AS7/tests/src/org/hornetq/tests/integration/jms/server/JMSServerStartStopTest.java 2012-01-02
18:08:57 UTC (rev 11945)
+++
branches/Branch_2_2_AS7/tests/src/org/hornetq/tests/integration/jms/server/JMSServerStartStopTest.java 2012-01-02
18:10:29 UTC (rev 11946)
@@ -35,7 +35,6 @@
import org.hornetq.jms.server.impl.JMSServerManagerImpl;
import org.hornetq.spi.core.security.HornetQSecurityManager;
import org.hornetq.spi.core.security.HornetQSecurityManagerImpl;
-import org.hornetq.tests.util.ServiceTestBase;
import org.hornetq.tests.util.UnitTestCase;
/**
@@ -72,7 +71,8 @@
start();
- HornetQConnectionFactory jbcf = (HornetQConnectionFactory)
HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, new
TransportConfiguration(NettyConnectorFactory.class.getCanonicalName()));
+ HornetQConnectionFactory jbcf =
(HornetQConnectionFactory)HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF,
+
new
TransportConfiguration(NettyConnectorFactory.class.getCanonicalName()));
jbcf.setBlockOnDurableSend(true);
jbcf.setBlockOnNonDurableSend(true);
@@ -99,7 +99,8 @@
start();
- HornetQConnectionFactory jbcf = (HornetQConnectionFactory)
HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, new
TransportConfiguration(NettyConnectorFactory.class.getCanonicalName()));
+ HornetQConnectionFactory jbcf =
(HornetQConnectionFactory)HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF,
+
new
TransportConfiguration(NettyConnectorFactory.class.getCanonicalName()));
jbcf.setBlockOnDurableSend(true);
jbcf.setBlockOnNonDurableSend(true);
@@ -129,22 +130,25 @@
stop();
}
-
+
//
https://jira.jboss.org/jira/browse/HORNETQ-315
public void testCloseConnectionAfterServerIsShutdown() throws Exception
{
start();
-
- HornetQConnectionFactory jbcf = (HornetQConnectionFactory)
HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, new
TransportConfiguration(NettyConnectorFactory.class.getCanonicalName()));
+ HornetQConnectionFactory jbcf =
(HornetQConnectionFactory)HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF,
+
new
TransportConfiguration(NettyConnectorFactory.class.getCanonicalName()));
+
jbcf.setBlockOnDurableSend(true);
jbcf.setBlockOnNonDurableSend(true);
jbcf.setReconnectAttempts(-1);
-
+
Connection conn = jbcf.createConnection();
-
+
stop();
+ Thread.sleep(1000);
+
conn.close();
}
@@ -161,7 +165,10 @@
@Override
protected void tearDown() throws Exception
{
- liveJMSServer.stop();
+ if (liveJMSServer != null)
+ {
+ liveJMSServer.stop();
+ }
liveJMSServer = null;
super.tearDown();
}
@@ -180,7 +187,7 @@
fc.setConfigurationUrl("server-start-stop-config1.xml");
fc.start();
-
+
fc.setJournalDirectory(getJournalDir());
fc.setBindingsDirectory(getBindingsDir());
fc.setLargeMessagesDirectory(getLargeMessagesDir());