[jboss-cvs] JBossRemoting/src/tests/org/jboss/test/remoting/transport/http/chunked ...

Tom Elrod tom.elrod at jboss.com
Sun Feb 25 15:47:43 EST 2007


  User: telrod  
  Date: 07/02/25 15:47:43

  Modified:    src/tests/org/jboss/test/remoting/transport/http/chunked   
                        Tag: remoting_2_x ChunkedTestCase.java
                        ChunkedMarshaller.java Chunked2TestCase.java
  Log:
  JBREM-711 - fix for chuncked tests.  Basically just allowing the tests to run longer before getting killed.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.4.2   +78 -0     JBossRemoting/src/tests/org/jboss/test/remoting/transport/http/chunked/ChunkedTestCase.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: ChunkedTestCase.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossRemoting/src/tests/org/jboss/test/remoting/transport/http/chunked/ChunkedTestCase.java,v
  retrieving revision 1.1.4.1
  retrieving revision 1.1.4.2
  diff -u -b -r1.1.4.1 -r1.1.4.2
  --- ChunkedTestCase.java	6 Dec 2006 05:25:57 -0000	1.1.4.1
  +++ ChunkedTestCase.java	25 Feb 2007 20:47:42 -0000	1.1.4.2
  @@ -22,6 +22,7 @@
   package org.jboss.test.remoting.transport.http.chunked;
   
   import org.jboss.test.remoting.transport.InvokerTestDriver;
  +import org.jboss.test.remoting.performance.synchronous.PerformanceTestCase;
   
   /**
    * @author <a href="mailto:tom.elrod at jboss.com">Tom Elrod</a>
  @@ -34,4 +35,81 @@
                        1,
                        ChunkedServer.class.getName());
      }
  +
  +   /**
  +    * How long to wait for test results to be returned from the client(s).  If goes longer than the
  +    * specified limit, will throw an exception and kill the running test cases.  Default value is
  +    * RESULTS_TIMEOUT.
  +    *
  +    * @return
  +    */
  +   protected long getResultsTimeout()
  +   {
  +      long defaultTimeout = 600000; // default to 10 minutes
  +
  +      String timeout = System.getProperty(PerformanceTestCase.RESULT_TIMEOUT);
  +      if(timeout != null && timeout.length() > 0)
  +      {
  +         try
  +         {
  +            defaultTimeout = Long.parseLong(timeout);
  +         }
  +         catch(NumberFormatException e)
  +         {
  +            System.out.println("Can not use " + timeout + " as timeout value as is not a number");
  +         }
  +      }
  +      return defaultTimeout;
  +   }
  +
  +   /**
  +    * How long for the server test case to wait for tear down message.  If exceeds timeout,
  +    * will throw exception.  The default value is TEARDOWN_TIMEOUT.
  +    *
  +    * @return
  +    */
  +   protected long getTearDownTimeout()
  +   {
  +      long defaultTimeout = 600000; // default to 10 minutes
  +
  +      String timeout = System.getProperty(PerformanceTestCase.TEAR_DOWN_TIMEOUT);
  +      if(timeout != null && timeout.length() > 0)
  +      {
  +         try
  +         {
  +            defaultTimeout = Long.parseLong(timeout);
  +         }
  +         catch(NumberFormatException e)
  +         {
  +            System.out.println("Can not use " + timeout + " as timeout value as is not a number");
  +         }
  +      }
  +      return defaultTimeout;
  +   }
  +
  +   /**
  +    * How long to allow each of the test cases to run their tests.  If exceeds this timeout
  +    * will throw exception and kill tests.  The default value is RUN_TEST_TIMEOUT.
  +    *
  +    * @return
  +    */
  +   protected long getRunTestTimeout()
  +   {
  +      long defaultTimeout = 600000; // default to 10 minutes
  +
  +      String timeout = System.getProperty(PerformanceTestCase.RUN_TEST_TIMEOUT);
  +      if(timeout != null && timeout.length() > 0)
  +      {
  +         try
  +         {
  +            defaultTimeout = Long.parseLong(timeout);
  +         }
  +         catch(NumberFormatException e)
  +         {
  +            System.out.println("Can not use " + timeout + " as timeout value as is not a number");
  +         }
  +      }
  +      return defaultTimeout;
  +   }
  +
   }
  \ No newline at end of file
  
  
  
  1.1.4.1   +0 -0      JBossRemoting/src/tests/org/jboss/test/remoting/transport/http/chunked/ChunkedMarshaller.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  
  
  
  1.1.4.2   +77 -0     JBossRemoting/src/tests/org/jboss/test/remoting/transport/http/chunked/Chunked2TestCase.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: Chunked2TestCase.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossRemoting/src/tests/org/jboss/test/remoting/transport/http/chunked/Chunked2TestCase.java,v
  retrieving revision 1.1.4.1
  retrieving revision 1.1.4.2
  diff -u -b -r1.1.4.1 -r1.1.4.2
  --- Chunked2TestCase.java	6 Dec 2006 05:25:57 -0000	1.1.4.1
  +++ Chunked2TestCase.java	25 Feb 2007 20:47:42 -0000	1.1.4.2
  @@ -1,6 +1,7 @@
   package org.jboss.test.remoting.transport.http.chunked;
   
   import org.jboss.test.remoting.transport.InvokerTestDriver;
  +import org.jboss.test.remoting.performance.synchronous.PerformanceTestCase;
   
   /**
    * @author <a href="mailto:tom.elrod at jboss.com">Tom Elrod</a>
  @@ -13,4 +14,80 @@
                        1,
                        ChunkedServer.class.getName());
      }
  +   /**
  +    * How long to wait for test results to be returned from the client(s).  If goes longer than the
  +    * specified limit, will throw an exception and kill the running test cases.  Default value is
  +    * RESULTS_TIMEOUT.
  +    *
  +    * @return
  +    */
  +   protected long getResultsTimeout()
  +   {
  +      long defaultTimeout = 600000; // default to 10 minutes
  +
  +      String timeout = System.getProperty(PerformanceTestCase.RESULT_TIMEOUT);
  +      if(timeout != null && timeout.length() > 0)
  +      {
  +         try
  +         {
  +            defaultTimeout = Long.parseLong(timeout);
  +         }
  +         catch(NumberFormatException e)
  +         {
  +            System.out.println("Can not use " + timeout + " as timeout value as is not a number");
  +         }
  +      }
  +      return defaultTimeout;
  +   }
  +
  +   /**
  +    * How long for the server test case to wait for tear down message.  If exceeds timeout,
  +    * will throw exception.  The default value is TEARDOWN_TIMEOUT.
  +    *
  +    * @return
  +    */
  +   protected long getTearDownTimeout()
  +   {
  +      long defaultTimeout = 600000; // default to 10 minutes
  +
  +      String timeout = System.getProperty(PerformanceTestCase.TEAR_DOWN_TIMEOUT);
  +      if(timeout != null && timeout.length() > 0)
  +      {
  +         try
  +         {
  +            defaultTimeout = Long.parseLong(timeout);
  +         }
  +         catch(NumberFormatException e)
  +         {
  +            System.out.println("Can not use " + timeout + " as timeout value as is not a number");
  +         }
  +      }
  +      return defaultTimeout;
  +   }
  +
  +   /**
  +    * How long to allow each of the test cases to run their tests.  If exceeds this timeout
  +    * will throw exception and kill tests.  The default value is RUN_TEST_TIMEOUT.
  +    *
  +    * @return
  +    */
  +   protected long getRunTestTimeout()
  +   {
  +      long defaultTimeout = 600000; // default to 10 minutes
  +
  +      String timeout = System.getProperty(PerformanceTestCase.RUN_TEST_TIMEOUT);
  +      if(timeout != null && timeout.length() > 0)
  +      {
  +         try
  +         {
  +            defaultTimeout = Long.parseLong(timeout);
  +         }
  +         catch(NumberFormatException e)
  +         {
  +            System.out.println("Can not use " + timeout + " as timeout value as is not a number");
  +         }
  +      }
  +      return defaultTimeout;
  +   }
  +
   }
  
  
  



More information about the jboss-cvs-commits mailing list