Author: ron.sigal(a)jboss.com
Date: 2009-09-13 12:24:17 -0400 (Sun, 13 Sep 2009)
New Revision: 5468
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/lease/timeout/LeasePingerTimeoutTestCase.java
Log:
JBREM-956, JBREM-1154: Causing LeasePinger to throw exception necessitated changes in
this old unit test.
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/lease/timeout/LeasePingerTimeoutTestCase.java
===================================================================
---
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/lease/timeout/LeasePingerTimeoutTestCase.java 2009-09-13
15:51:39 UTC (rev 5467)
+++
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/lease/timeout/LeasePingerTimeoutTestCase.java 2009-09-13
16:24:17 UTC (rev 5468)
@@ -35,7 +35,6 @@
import org.apache.log4j.Level;
import org.apache.log4j.Logger;
import org.apache.log4j.PatternLayout;
-import org.jboss.logging.XLevel;
import org.jboss.remoting.Client;
import org.jboss.remoting.ConnectionListener;
import org.jboss.remoting.InvocationRequest;
@@ -80,7 +79,7 @@
if (firstTime)
{
firstTime = false;
- Logger.getLogger("org.jboss.remoting").setLevel(XLevel.INFO);
+ Logger.getLogger("org.jboss.remoting").setLevel(Level.INFO);
Logger.getLogger("org.jboss.test.remoting").setLevel(Level.INFO);
String pattern = "[%d{ABSOLUTE}] [%t] %5p (%F:%L) - %m%n";
PatternLayout layout = new PatternLayout(pattern);
@@ -234,9 +233,11 @@
// Verify that PING has been sent but not answered.
log.info("pingInvoked: " + pingInvoked);
Thread.sleep(5000);
- assertFalse(((Boolean) invokedField.get(pinger)).booleanValue());
+ log.info("ping invoked: " +
((Boolean)invokedField.get(pinger)).booleanValue());
+ log.info("ping succeeded: " +
((Boolean)succeedField.get(pinger)).booleanValue());
+ assertTrue(((Boolean) invokedField.get(pinger)).booleanValue());
assertFalse(((Boolean) succeedField.get(pinger)).booleanValue());
- log.info("LeasePinger has timed out withing 5000 ms");
+ log.info("LeasePinger has timed out within 5000 ms");
client.setDisconnectTimeout(0);
client.disconnect();
Show replies by thread