[jboss-remoting-commits] JBoss Remoting SVN: r4088 - remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/startup.

jboss-remoting-commits at lists.jboss.org jboss-remoting-commits at lists.jboss.org
Tue Apr 29 02:01:09 EDT 2008


Author: ron.sigal at jboss.com
Date: 2008-04-29 02:01:09 -0400 (Tue, 29 Apr 2008)
New Revision: 4088

Modified:
   remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/startup/JNDIDetectorClient.java
   remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/startup/JNDIDetectorServer.java
   remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/startup/JNDIDetectorTestCase.java
Log:
JBREM-930: (1) Uses jrunit.bind_addr; (2) set log level to TRACE.

Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/startup/JNDIDetectorClient.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/startup/JNDIDetectorClient.java	2008-04-26 22:08:25 UTC (rev 4087)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/startup/JNDIDetectorClient.java	2008-04-29 06:01:09 UTC (rev 4088)
@@ -45,7 +45,8 @@
 
    public void setUp() throws Exception
    {
-      String detectorHost = InetAddress.getLocalHost().getHostName();
+      String host = InetAddress.getLocalHost().getHostName();
+      String detectorHost = System.getProperty("jrunit.bind_addr", host);
 
       detector = new JNDIDetector();
       detector.setCleanDetectionNumber(2);
@@ -77,6 +78,7 @@
       long end = System.currentTimeMillis();
 
       System.out.println("instance = " + instances);
+      System.out.println("instances.length: " + instances.length);
       System.out.println("force detection took " + (end - start) + " milliseconds.");
 
       assertEquals(1, instances.length);

Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/startup/JNDIDetectorServer.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/startup/JNDIDetectorServer.java	2008-04-26 22:08:25 UTC (rev 4087)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/startup/JNDIDetectorServer.java	2008-04-29 06:01:09 UTC (rev 4088)
@@ -53,16 +53,14 @@
    {
       // start JNDI server
       int port = 1099;
-      //String host = "localhost";
       String host = InetAddress.getLocalHost().getHostName();
+      String bindAddr = System.getProperty("jrunit.bind_addr", host);
       Main JNDIServer = new Main();
       JNDIServer.setPort(port);
-      JNDIServer.setBindAddress(host);
+      JNDIServer.setBindAddress(bindAddr);
       JNDIServer.start();
-      System.out.println("Started JNDI server on " + host + ":" + port);
+      System.out.println("Started JNDI server on " + bindAddr + ":" + port);
 
-      String detectorHost = InetAddress.getLocalHost().getHostName();
-
       detector = new JNDIDetector();
       detector.setCleanDetectionNumber(2);
 
@@ -77,7 +75,6 @@
       port = TestUtil.getRandomPort();
       System.out.println("port = " + port);
 
-      String bindAddr = System.getProperty("jrunit.bind_addr", host);
       InvokerLocator locator = new InvokerLocator("socket://" + bindAddr + ":" + port);
 
       System.out.println("Starting remoting server with locator uri of: " + locator.getLocatorURI());
@@ -98,7 +95,7 @@
 
       // set config info for detector and start it.
       detector.setPort(detectorPort);
-      detector.setHost(detectorHost);
+      detector.setHost(bindAddr);
       detector.setContextFactory(contextFactory);
       detector.setURLPackage(urlPackage);
       detector.start();

Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/startup/JNDIDetectorTestCase.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/startup/JNDIDetectorTestCase.java	2008-04-26 22:08:25 UTC (rev 4087)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/startup/JNDIDetectorTestCase.java	2008-04-29 06:01:09 UTC (rev 4088)
@@ -21,7 +21,9 @@
 */
 package org.jboss.test.remoting.detection.jndi.startup;
 
+import org.apache.log4j.Level;
 import org.jboss.jrunit.harness.TestDriver;
+import org.jboss.logging.XLevel;
 
 /**
  * @author <a href="mailto:tom.elrod at jboss.com">Tom Elrod</a>
@@ -35,4 +37,8 @@
                      JNDIDetectorServer.class.getName());
    }
 
+   protected Level getTestLogLevel()
+   {
+      return XLevel.TRACE;
+   }
 }
\ No newline at end of file




More information about the jboss-remoting-commits mailing list