Author: ron.sigal(a)jboss.com
Date: 2008-11-29 22:35:32 -0500 (Sat, 29 Nov 2008)
New Revision: 4747
Modified:
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/connection/deadlock/DeadlockTestClient.java
Log:
JBREM-1070: Reduced iterations and shortened ping interval; cosmetic changes.
Modified:
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/connection/deadlock/DeadlockTestClient.java
===================================================================
---
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/connection/deadlock/DeadlockTestClient.java 2008-11-30
03:34:56 UTC (rev 4746)
+++
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/connection/deadlock/DeadlockTestClient.java 2008-11-30
03:35:32 UTC (rev 4747)
@@ -1,3 +1,25 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
package org.jboss.test.remoting.connection.deadlock;
import java.net.InetAddress;
@@ -16,7 +38,15 @@
import org.jboss.remoting.ConnectionValidator;
import org.jboss.remoting.InvokerLocator;
-
+/**
+ * Unit test for JBREM-1070.
+ *
+ * @author <a href="ron.sigal(a)jboss.com">Ron Sigal</a>
+ * @version
+ * <p>
+ * Copyright Nov 29, 2008
+ * </p>
+ */
public class DeadlockTestClient extends TestCase
{
private static Logger log = Logger.getLogger(DeadlockTestClient.class);
@@ -34,7 +64,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);
@@ -52,10 +82,10 @@
public void testForDeadlock() throws Throwable
{
log.info("entering " + getName());
- for (int i = 0; i < 50; i++)
+ for (int i = 0; i < 20; i++)
{
assertTrue("failed execution: " + i, doTest());
- log.info("execution " + i + " PASES\n");
+ log.info("execution " + i + " PASSES\n");
}
log.info(getName() + " PASSES");
}
@@ -74,7 +104,7 @@
InvokerLocator clientLocator = new InvokerLocator(locatorURI);
HashMap clientConfig = new HashMap();
clientConfig.put(ConnectionValidator.VALIDATOR_PING_TIMEOUT, "10000");
- clientConfig.put(ConnectionValidator.VALIDATOR_PING_PERIOD, "20000");
+ clientConfig.put(ConnectionValidator.VALIDATOR_PING_PERIOD, "1000");
addExtraClientConfig(clientConfig);
Client client = new Client(clientLocator, clientConfig);
client.connect();