resolve intermittent failure of InactivityMonitorTest, test needed to pass negotiation to enable inactivity monitor with a version > 1

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@898730 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary Tully 2010-01-13 12:22:22 +00:00
parent 16e060bd7e
commit a593e35d82
2 changed files with 3 additions and 2 deletions

View File

@ -170,7 +170,7 @@ public class InactivityMonitor extends TransportFilter {
}
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()));
};
});

View File

@ -185,6 +185,7 @@ public class InactivityMonitorTest extends CombinationTestSupport implements Tra
});
clientTransport.start();
WireFormatInfo info = new WireFormatInfo();
info.setVersion(OpenWireFormat.DEFAULT_VERSION);
info.setMaxInactivityDuration(1000);
clientTransport.oneway(info);
@ -193,7 +194,7 @@ public class InactivityMonitorTest extends CombinationTestSupport implements Tra
// 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);