[jboss-cvs] JBossRemoting/src/tests/org/jboss/test/remoting/shutdown ...

Ron Sigal ron_sigal at yahoo.com
Sat Jun 23 03:23:34 EDT 2007


  User: rsigal  
  Date: 07/06/23 03:23:34

  Modified:    src/tests/org/jboss/test/remoting/shutdown  Tag:
                        remoting_2_x ShutdownTestParent.java
  Log:
  JBREM-760: Added port system property to commands.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.3   +9 -4      JBossRemoting/src/tests/org/jboss/test/remoting/shutdown/ShutdownTestParent.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: ShutdownTestParent.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossRemoting/src/tests/org/jboss/test/remoting/shutdown/ShutdownTestParent.java,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -b -r1.1.2.2 -r1.1.2.3
  --- ShutdownTestParent.java	4 Feb 2007 22:07:42 -0000	1.1.2.2
  +++ ShutdownTestParent.java	23 Jun 2007 07:23:34 -0000	1.1.2.3
  @@ -24,10 +24,12 @@
   import java.io.BufferedReader;
   import java.io.IOException;
   import java.io.InputStreamReader;
  +import java.net.InetAddress;
   
   import junit.framework.TestCase;
   
   import org.apache.log4j.Logger;
  +import org.jboss.remoting.transport.PortUtil;
   
   /** 
    * This unit test is meant to guard against the possibility of accidentally
  @@ -38,7 +40,7 @@
    * (http://jira.jboss.com/jira/browse/JBREM-674)
    * 
    * @author <a href="ron.sigal at jboss.com">Ron Sigal</a>
  - * @version $Revision: 1.1.2.2 $
  + * @version $Revision: 1.1.2.3 $
    * <p>
    * Copyright Jan 19, 2007
    * </p>
  @@ -49,6 +51,7 @@
   
      protected boolean serverSuccessful;
      protected boolean clientSuccessful;
  +   protected int port;
      
      
      public void setUp()
  @@ -68,8 +71,9 @@
      {
         log.info("entering testShutdown()");
         
  +      port = PortUtil.findFreePort(InetAddress.getLocalHost().getHostName());
         String command = "java -cp \"" +  System.getProperty("java.class.path") + "\" ";
  -      command += getJVMArguments() + " ";
  +      command += getJVMArguments() + " -Dport=" + port + " ";
         String serverCommand = command + ShutdownTestServer.class.getName() + " " + getTransport();
         serverCommand += " " + getServerArgs();
         String clientCommand = command + HangingClient.class.getName() + " " + getTransport();
  @@ -94,8 +98,9 @@
      {
         log.info("entering testShutdown()");
         
  +      port = PortUtil.findFreePort(InetAddress.getLocalHost().getHostName());
         String command = "java -cp \"" +  System.getProperty("java.class.path") + "\" ";
  -      command += getJVMArguments() + " ";
  +      command += getJVMArguments() + " -Dport=" + port + " ";
         String serverCommand = command + ShutdownTestServer.class.getName() + " " + getTransport();
         serverCommand += " " + getServerArgs();
         String clientCommand = command + ClosingClient.class.getName() + " " + getTransport();
  @@ -110,7 +115,7 @@
      }
      
      
  -   protected String getJVMArguments()
  +   protected String getJVMArguments() throws Exception
      {
         return "";
      }
  
  
  



More information about the jboss-cvs-commits mailing list