Author: ron.sigal(a)jboss.com
Date: 2008-11-29 22:57:28 -0500 (Sat, 29 Nov 2008)
New Revision: 4750
Modified:
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/connection/deadlock/DeadlockTestServer.java
Log:
JBREM-1070: Class extends jrunit ServerTestCase.
Modified:
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/connection/deadlock/DeadlockTestServer.java
===================================================================
---
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/connection/deadlock/DeadlockTestServer.java 2008-11-30
03:56:41 UTC (rev 4749)
+++
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/connection/deadlock/DeadlockTestServer.java 2008-11-30
03:57:28 UTC (rev 4750)
@@ -28,12 +28,11 @@
import javax.management.MBeanServer;
-import junit.framework.TestCase;
-
import org.apache.log4j.ConsoleAppender;
import org.apache.log4j.Level;
import org.apache.log4j.Logger;
import org.apache.log4j.PatternLayout;
+import org.jboss.jrunit.extensions.ServerTestCase;
import org.jboss.logging.XLevel;
import org.jboss.remoting.Client;
import org.jboss.remoting.ConnectionListener;
@@ -54,7 +53,7 @@
* Copyright Nov 29, 2008
* </p>
*/
-public class DeadlockTestServer extends TestCase
+public class DeadlockTestServer extends ServerTestCase
{
private static Logger log = Logger.getLogger(DeadlockTestServer.class);
@@ -85,23 +84,26 @@
}
- public void setUp()
+ public void setUp() throws Exception
{
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);
ConsoleAppender consoleAppender = new ConsoleAppender(layout);
Logger.getRootLogger().addAppender(consoleAppender);
}
+
+ setupServer();
}
- public void tearDown()
+ public void tearDown() throws Exception
{
+ shutdownServer();
}
@@ -170,7 +172,7 @@
if ("$PING$".equals(invocation.getParameter()))
{
log.info("TestServerInvoker received $PING$");
- Thread.sleep(20000);
+ Thread.sleep(10000);
throw new Exception("got $PING$");
}
else
Show replies by date