activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r1483838 - in /activemq/trunk/activemq-mqtt/src/test: java/org/apache/activemq/transport/mqtt/ resources/
Date Fri, 17 May 2013 14:59:08 GMT
Author: chirino
Date: Fri May 17 14:59:08 2013
New Revision: 1483838

URL: http://svn.apache.org/r1483838
Log:
Add more logging to aid in failing test diagnosis.

Modified:
    activemq/trunk/activemq-mqtt/src/test/java/org/apache/activemq/transport/mqtt/AbstractMQTTTest.java
    activemq/trunk/activemq-mqtt/src/test/java/org/apache/activemq/transport/mqtt/MQTTNioTest.java
    activemq/trunk/activemq-mqtt/src/test/java/org/apache/activemq/transport/mqtt/MQTTTest.java
    activemq/trunk/activemq-mqtt/src/test/resources/log4j.properties

Modified: activemq/trunk/activemq-mqtt/src/test/java/org/apache/activemq/transport/mqtt/AbstractMQTTTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-mqtt/src/test/java/org/apache/activemq/transport/mqtt/AbstractMQTTTest.java?rev=1483838&r1=1483837&r2=1483838&view=diff
==============================================================================
--- activemq/trunk/activemq-mqtt/src/test/java/org/apache/activemq/transport/mqtt/AbstractMQTTTest.java
(original)
+++ activemq/trunk/activemq-mqtt/src/test/java/org/apache/activemq/transport/mqtt/AbstractMQTTTest.java
Fri May 17 14:59:08 2013
@@ -332,7 +332,7 @@ public abstract class AbstractMQTTTest e
     }
 
     protected void addMQTTConnector(String config) throws Exception {
-        mqttConnector= brokerService.addConnector(getProtocolScheme()+"://localhost:0" +
config);
+        mqttConnector = brokerService.addConnector(getProtocolScheme()+"://localhost:0?trace=true&"
+ config);
     }
 
     protected void initializeConnection(MQTTClientProvider provider) throws Exception {

Modified: activemq/trunk/activemq-mqtt/src/test/java/org/apache/activemq/transport/mqtt/MQTTNioTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-mqtt/src/test/java/org/apache/activemq/transport/mqtt/MQTTNioTest.java?rev=1483838&r1=1483837&r2=1483838&view=diff
==============================================================================
--- activemq/trunk/activemq-mqtt/src/test/java/org/apache/activemq/transport/mqtt/MQTTNioTest.java
(original)
+++ activemq/trunk/activemq-mqtt/src/test/java/org/apache/activemq/transport/mqtt/MQTTNioTest.java
Fri May 17 14:59:08 2013
@@ -32,7 +32,7 @@ public class MQTTNioTest extends MQTTTes
 
     @Test
     public void testPingOnMQTTNIO() throws Exception {
-        addMQTTConnector("?maxInactivityDuration=-1");
+        addMQTTConnector("maxInactivityDuration=-1");
         brokerService.start();
         MQTT mqtt = createMQTTConnection();
         mqtt.setKeepAlive((short)2);

Modified: activemq/trunk/activemq-mqtt/src/test/java/org/apache/activemq/transport/mqtt/MQTTTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-mqtt/src/test/java/org/apache/activemq/transport/mqtt/MQTTTest.java?rev=1483838&r1=1483837&r2=1483838&view=diff
==============================================================================
--- activemq/trunk/activemq-mqtt/src/test/java/org/apache/activemq/transport/mqtt/MQTTTest.java
(original)
+++ activemq/trunk/activemq-mqtt/src/test/java/org/apache/activemq/transport/mqtt/MQTTTest.java
Fri May 17 14:59:08 2013
@@ -51,7 +51,7 @@ public class MQTTTest extends AbstractMQ
 
     @Test(timeout=300000)
     public void testTurnOffInactivityMonitor()throws Exception{
-        addMQTTConnector("?transport.useInactivityMonitor=false");
+        addMQTTConnector("transport.useInactivityMonitor=false");
         brokerService.start();
         MQTT mqtt = createMQTTConnection();
         mqtt.setKeepAlive((short)2);
@@ -72,7 +72,7 @@ public class MQTTTest extends AbstractMQ
     @Test(timeout=30000)
     public void testDefaultKeepAliveWhenClientSpecifiesZero() throws Exception {
         // default keep alive in milliseconds
-        addMQTTConnector("?transport.defaultKeepAlive=2000");
+        addMQTTConnector("transport.defaultKeepAlive=2000");
         brokerService.start();
         MQTT mqtt = createMQTTConnection();
         mqtt.setKeepAlive((short)0);
@@ -121,11 +121,6 @@ public class MQTTTest extends AbstractMQ
     }
 
     @Override
-    protected void addMQTTConnector(String config) throws Exception {
-        mqttConnector = brokerService.addConnector(getProtocolScheme()+"://localhost:0" +
config);
-    }
-
-    @Override
     protected MQTTClientProvider getMQTTClientProvider() {
         return new FuseMQQTTClientProvider();
     }
@@ -145,12 +140,12 @@ public class MQTTTest extends AbstractMQ
         return new Tracer(){
             @Override
             public void onReceive(MQTTFrame frame) {
-                LOG.info("recv: "+frame);
+                LOG.info("Client Received:\n"+frame);
             }
 
             @Override
             public void onSend(MQTTFrame frame) {
-                LOG.info("send: " + frame);
+                LOG.info("Client Sent:\n" + frame);
             }
 
             @Override

Modified: activemq/trunk/activemq-mqtt/src/test/resources/log4j.properties
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-mqtt/src/test/resources/log4j.properties?rev=1483838&r1=1483837&r2=1483838&view=diff
==============================================================================
--- activemq/trunk/activemq-mqtt/src/test/resources/log4j.properties (original)
+++ activemq/trunk/activemq-mqtt/src/test/resources/log4j.properties Fri May 17 14:59:08 2013
@@ -20,18 +20,12 @@
 #
 log4j.rootLogger=INFO, out, stdout
 
-#log4j.logger.org.apache.activemq.network.DemandForwardingBridgeSupport=DEBUG
-#log4j.logger.org.apache.activemq.transport.failover=TRACE
-log4j.logger.org.apache.activemq.transport.mqtt=DEBUG
-#log4j.logger.org.apache.activemq.store.jdbc=TRACE
-#log4j.logger.org.apache.activemq.broker.region.cursors.AbstractStoreCursor=DEBUG
-#log4j.logger.org.apache.activemq.store.jdbc.JDBCMessageStore=DEBUG
+log4j.logger.org.apache.activemq.transport.mqtt=TRACE
 
 # CONSOLE appender not used by default
 log4j.appender.stdout=org.apache.log4j.ConsoleAppender
 log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d [%-15.15t] - %-5p %-30.30c{1} - %m%n
-#log4j.appender.stdout.layout.ConversionPattern=%d [%-15.15t] - %-5p %-30.30c{1} - %-10.10X{activemq.broker}
%-20.20X{activemq.connector} %-10.10X{activemq.destination} - %m%n
+log4j.appender.stdout.layout.ConversionPattern=%d | %-5p | %-30.30c{1} | %m%n
 
 # File appender
 log4j.appender.out=org.apache.log4j.FileAppender



Mime
View raw message