[jboss-cvs] JBossRemoting/src/tests/org/jboss/test/remoting/transport/socket/load ...

Tom Elrod tom.elrod at jboss.com
Tue Aug 22 23:57:38 EDT 2006


  User: telrod  
  Date: 06/08/22 23:57:38

  Modified:    src/tests/org/jboss/test/remoting/transport/socket/load 
                        PooledConnectionTestCase.java
  Log:
  JBREM-586 - fixed socket client invoker so is back to having bounded connection pool
  
  Revision  Changes    Path
  1.2       +6 -5      JBossRemoting/src/tests/org/jboss/test/remoting/transport/socket/load/PooledConnectionTestCase.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: PooledConnectionTestCase.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossRemoting/src/tests/org/jboss/test/remoting/transport/socket/load/PooledConnectionTestCase.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- PooledConnectionTestCase.java	21 Jun 2006 19:33:05 -0000	1.1
  +++ PooledConnectionTestCase.java	23 Aug 2006 03:57:38 -0000	1.2
  @@ -1,5 +1,6 @@
   package org.jboss.test.remoting.transport.socket.load;
   
  +import EDU.oswego.cs.dl.util.concurrent.SynchronizedInt;
   import junit.framework.TestCase;
   import org.apache.log4j.Logger;
   import org.jboss.remoting.Client;
  @@ -10,7 +11,7 @@
   {
      private static int numOfRunnerThreads = 10;
   //   private static int numOfRunnerThreads = 3;
  -   private static int responseCount = 0;
  +   private static SynchronizedInt responseCount = new SynchronizedInt(0);
      private Connector connector;
   
   //   static
  @@ -67,11 +68,11 @@
         Thread.currentThread().sleep(8000);
         // should not have all invocations as should be blocking within client invoker (as only
         // allows 2 concurrent client connections).
  -      assertFalse(10 == PooledConnectionTestCase.responseCount);
  +      assertFalse(10 == PooledConnectionTestCase.responseCount.get());
         
         Thread.currentThread().sleep(120000);
         System.out.println("Response count = " + PooledConnectionTestCase.responseCount + ".  Expected 10.");
  -      assertEquals(10, PooledConnectionTestCase.responseCount);
  +      assertEquals(10, PooledConnectionTestCase.responseCount.get());
      }
   
      public void runClient(String clientId) throws Throwable
  @@ -82,7 +83,7 @@
         client.connect();
         String req = clientId;
         Object resp = client.invoke(req);
  -      PooledConnectionTestCase.responseCount++;
  +      PooledConnectionTestCase.responseCount.increment();
         System.out.println("Received response of: " + resp + ".  Response count = " + PooledConnectionTestCase.responseCount);
         System.in.read();
      }
  
  
  



More information about the jboss-cvs-commits mailing list