activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1490311 - /activemq/trunk/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/AmqpTransformerTest.java
Date Thu, 06 Jun 2013 14:51:52 GMT
Author: tabish
Date: Thu Jun  6 14:51:52 2013
New Revision: 1490311

URL: http://svn.apache.org/r1490311
Log:
https://issues.apache.org/jira/browse/AMQ-4568

fix potential NPE

Modified:
    activemq/trunk/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/AmqpTransformerTest.java

Modified: activemq/trunk/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/AmqpTransformerTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/AmqpTransformerTest.java?rev=1490311&r1=1490310&r2=1490311&view=diff
==============================================================================
--- activemq/trunk/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/AmqpTransformerTest.java
(original)
+++ activemq/trunk/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/AmqpTransformerTest.java
Thu Jun  6 14:51:52 2013
@@ -72,7 +72,6 @@ public class AmqpTransformerTest {
         amqpSession.close();
         amqpConnection.close();
 
-
         // receive with openwire JMS
         ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("tcp://0.0.0.0:"
+ openwirePort);
         Connection openwireConn = factory.createConnection();
@@ -95,10 +94,9 @@ public class AmqpTransformerTest {
         c.close();
         session.close();
         openwireConn.close();
-
     }
 
-    @Test(timeout=30000)
+    @Test(timeout = 30000)
     public void testRawTransformation() throws Exception {
 
         // default is native
@@ -120,7 +118,6 @@ public class AmqpTransformerTest {
         amqpSession.close();
         amqpConnection.close();
 
-
         // receive with openwire JMS
         ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("tcp://0.0.0.0:"
+ openwirePort);
         Connection openwireConn = factory.createConnection();
@@ -139,15 +136,13 @@ public class AmqpTransformerTest {
         assertTrue("Didn't use the correct transformation, expected NATIVE", nativeTransformationUsed);
         assertEquals(2, message.getJMSDeliveryMode());
 
-        // should not equal 7 (should equal the default)  because "raw" does not map
+        // should not equal 7 (should equal the default) because "raw" does not map
         // headers
         assertEquals(4, message.getJMSPriority());
 
-
         c.close();
         session.close();
         openwireConn.close();
-
     }
 
     @Test
@@ -171,7 +166,6 @@ public class AmqpTransformerTest {
         amqpSession.close();
         amqpConnection.close();
 
-
         // receive with openwire JMS
         ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("tcp://0.0.0.0:"
+ openwirePort);
         Connection openwireConn = factory.createConnection();
@@ -193,7 +187,6 @@ public class AmqpTransformerTest {
         c.close();
         session.close();
         openwireConn.close();
-
     }
 
     public Connection createAmqpConnection() throws JMSException {
@@ -209,14 +202,13 @@ public class AmqpTransformerTest {
         return connection;
     }
 
-
     public void startBrokerWithAmqpTransport(String amqpUrl) throws Exception {
         brokerService = new BrokerService();
         brokerService.setPersistent(false);
         brokerService.setAdvisorySupport(false);
         brokerService.setDeleteAllMessagesOnStartup(true);
 
-        TransportConnector connector =  brokerService.addConnector(amqpUrl);
+        TransportConnector connector = brokerService.addConnector(amqpUrl);
         amqpPort = connector.getConnectUri().getPort();
         connector = brokerService.addConnector("tcp://0.0.0.0:0");
         openwirePort = connector.getConnectUri().getPort();



Mime
View raw message