activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject svn commit: r898730 - in /activemq/trunk/activemq-core/src: main/java/org/apache/activemq/transport/InactivityMonitor.java test/java/org/apache/activemq/transport/tcp/InactivityMonitorTest.java
Date Wed, 13 Jan 2010 12:22:22 GMT
Author: gtully
Date: Wed Jan 13 12:22:22 2010
New Revision: 898730

URL: http://svn.apache.org/viewvc?rev=898730&view=rev
Log:
resolve intermittent failure of InactivityMonitorTest, test needed to pass negotiation to
enable inactivity monitor with a version > 1

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/InactivityMonitor.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/InactivityMonitorTest.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/InactivityMonitor.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/InactivityMonitor.java?rev=898730&r1=898729&r2=898730&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/InactivityMonitor.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/InactivityMonitor.java
Wed Jan 13 12:22:22 2010
@@ -170,7 +170,7 @@
             }
             ASYNC_TASKS.execute(new Runnable() {  
                 public void run() {
-                    onException(new InactivityIOException("Channel was inactive for too long:
"+next.getRemoteAddress()));
+                    onException(new InactivityIOException("Channel was inactive for too (>"
+ readCheckTime + ") long: "+next.getRemoteAddress()));
                 };
                 
             });

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/InactivityMonitorTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/InactivityMonitorTest.java?rev=898730&r1=898729&r2=898730&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/InactivityMonitorTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/InactivityMonitorTest.java
Wed Jan 13 12:22:22 2010
@@ -185,6 +185,7 @@
         });
         clientTransport.start();
         WireFormatInfo info = new WireFormatInfo();
+        info.setVersion(OpenWireFormat.DEFAULT_VERSION);
         info.setMaxInactivityDuration(1000);
         clientTransport.oneway(info);
 
@@ -193,7 +194,7 @@
 
         // Server should consider the client timed out right away since the
         // client is not hart beating fast enough.
-        Thread.sleep(3000);
+        Thread.sleep(6000);
 
         assertEquals(0, clientErrorCount.get());
         assertTrue(serverErrorCount.get() > 0);



Mime
View raw message