[jboss-cvs] JBossRemoting/src/tests/org/jboss/test/remoting/transport/multiplex/config ...

Ron Sigal ron_sigal at yahoo.com
Wed Aug 23 02:50:24 EDT 2006


  User: rsigal  
  Date: 06/08/23 02:50:24

  Modified:    src/tests/org/jboss/test/remoting/transport/multiplex/config 
                        ClientConfigurationTestClient.java
  Log:
  JBREM-587:  setUp() tries 5 times to create sync socket.
  
  Revision  Changes    Path
  1.3       +29 -11    JBossRemoting/src/tests/org/jboss/test/remoting/transport/multiplex/config/ClientConfigurationTestClient.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: ClientConfigurationTestClient.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossRemoting/src/tests/org/jboss/test/remoting/transport/multiplex/config/ClientConfigurationTestClient.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -b -r1.2 -r1.3
  --- ClientConfigurationTestClient.java	3 Aug 2006 00:37:40 -0000	1.2
  +++ ClientConfigurationTestClient.java	23 Aug 2006 06:50:24 -0000	1.3
  @@ -50,6 +50,10 @@
      
      public void setUp()
      {
  +      Exception savedException = null;
  +      
  +      for (int i = 0; i < 5; i++)
  +      {
         try
         {
            syncSocket = new Socket(ClientConfigurationTestServer.syncHost, ClientConfigurationTestServer.syncPort);
  @@ -61,11 +65,25 @@
               is.read();
               connectorStarted = true;
            }
  +            
  +            break;
         }
         catch (Exception e)
         {
  -         log.error(e);
  -         e.printStackTrace();
  +            savedException = e;
  +            try
  +            {
  +               Thread.sleep(1000);
  +            }
  +            catch (InterruptedException ignored)
  +            {
  +            }
  +         }
  +      }
  +      
  +      if (syncSocket == null)
  +      {
  +         log.error(savedException);
         }
      }
   }
  
  
  



More information about the jboss-cvs-commits mailing list