activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1492251 - /activemq/trunk/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/AmqpTransformerTest.java
Date Wed, 12 Jun 2013 15:42:10 GMT
Author: tabish
Date: Wed Jun 12 15:42:09 2013
New Revision: 1492251

URL: http://svn.apache.org/r1492251
Log:
Add some more asserts to the test and clean up logging in the protocol converter, replace
all the System.out.println calls

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=1492251&r1=1492250&r2=1492251&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
Wed Jun 12 15:42:09 2013
@@ -18,6 +18,7 @@ package org.apache.activemq.transport.am
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 
 import javax.jms.BytesMessage;
@@ -38,12 +39,16 @@ import org.apache.qpid.amqp_1_0.jms.impl
 import org.apache.qpid.amqp_1_0.jms.impl.QueueImpl;
 import org.junit.After;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * @author <a href="http://www.christianposta.com/blog">Christian Posta</a>
  */
 public class AmqpTransformerTest {
 
+    private static final Logger LOG = LoggerFactory.getLogger(AmqpTransformerTest.class);
+
     private static final String AMQP_URL = "amqp://0.0.0.0:0%s";
     private BrokerService brokerService;
     private int amqpPort;
@@ -127,8 +132,10 @@ public class AmqpTransformerTest {
 
         MessageConsumer c = session.createConsumer(jmsDest);
 
-        Message message = c.receive(1000);
+        Message message = c.receive(2000);
 
+        assertNotNull("Should have received a message", message);
+        LOG.info("Recieved message: ", message);
         assertTrue(message instanceof BytesMessage);
         Boolean nativeTransformationUsed = message.getBooleanProperty("JMS_AMQP_NATIVE");
         Long messageFormat = message.getLongProperty("JMS_AMQP_MESSAGE_FORMAT");



Mime
View raw message