Author: borges
Date: 2012-01-12 07:07:21 -0500 (Thu, 12 Jan 2012)
New Revision: 12010
Modified:
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/jms/HornetQConnectionFactoryTest.java
Log:
Silence test, and only catch JMSException
Modified:
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/jms/HornetQConnectionFactoryTest.java
===================================================================
---
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/jms/HornetQConnectionFactoryTest.java 2012-01-11
22:42:54 UTC (rev 12009)
+++
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/jms/HornetQConnectionFactoryTest.java 2012-01-12
12:07:21 UTC (rev 12010)
@@ -19,6 +19,7 @@
import java.util.Map;
import javax.jms.Connection;
+import javax.jms.JMSException;
import javax.jms.Session;
import junit.framework.Assert;
@@ -30,7 +31,6 @@
import org.hornetq.api.jms.JMSFactoryType;
import org.hornetq.core.config.BroadcastGroupConfiguration;
import org.hornetq.core.config.Configuration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
import org.hornetq.core.logging.Logger;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.HornetQServers;
@@ -39,7 +39,7 @@
import org.hornetq.tests.util.UnitTestCase;
/**
- *
+ *
* A HornetQConnectionFactoryTest
*
* @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
@@ -60,7 +60,7 @@
public void testDefaultConstructor() throws Exception
{
- HornetQConnectionFactory cf = (HornetQConnectionFactory)
HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF);
+ HornetQConnectionFactory cf =
HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF);
assertFactoryParams(cf,
null,
null,
@@ -98,9 +98,8 @@
Assert.fail("Should throw exception");
}
- catch (Exception e)
+ catch (JMSException e)
{
- e.printStackTrace();
// Ok
}
if (conn != null)
@@ -115,7 +114,7 @@
public void testDefaultConstructorAndSetConnectorPairs() throws Exception
{
- HornetQConnectionFactory cf = (HornetQConnectionFactory)
HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, liveTC);
+ HornetQConnectionFactory cf =
HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, liveTC);
assertFactoryParams(cf,
new TransportConfiguration[]{liveTC},
@@ -157,7 +156,7 @@
public void testDiscoveryConstructor() throws Exception
{
DiscoveryGroupConfiguration groupConfiguration = new
DiscoveryGroupConfiguration(groupAddress, groupPort);
- HornetQConnectionFactory cf = (HornetQConnectionFactory)
HornetQJMSClient.createConnectionFactoryWithoutHA(groupConfiguration, JMSFactoryType.CF);
+ HornetQConnectionFactory cf =
HornetQJMSClient.createConnectionFactoryWithoutHA(groupConfiguration, JMSFactoryType.CF);
assertFactoryParams(cf,
null,
groupConfiguration,
@@ -196,7 +195,7 @@
public void testStaticConnectorListConstructor() throws Exception
{
- HornetQConnectionFactory cf = (HornetQConnectionFactory)
HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, liveTC);
+ HornetQConnectionFactory cf =
HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, liveTC);
assertFactoryParams(cf,
new TransportConfiguration[]{liveTC},
null,
@@ -236,7 +235,7 @@
public void testStaticConnectorLiveConstructor() throws Exception
{
- HornetQConnectionFactory cf = (HornetQConnectionFactory)
HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, liveTC);
+ HornetQConnectionFactory cf =
HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, liveTC);
assertFactoryParams(cf,
new TransportConfiguration[]{liveTC},
null,
@@ -278,7 +277,7 @@
public void testGettersAndSetters()
{
- HornetQConnectionFactory cf = (HornetQConnectionFactory)
HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, liveTC);
+ HornetQConnectionFactory cf =
HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, liveTC);
long clientFailureCheckPeriod = RandomUtil.randomPositiveLong();
long connectionTTL = RandomUtil.randomPositiveLong();