~ubuntu-branches/ubuntu/raring/libjboss-remoting-java/raring

« back to all changes in this revision

Viewing changes to src/tests/org/jboss/test/remoting/transport/http/chunked/Chunked2TestCase.java

  • Committer: Package Import Robot
  • Author(s): Torsten Werner
  • Date: 2011-09-09 14:01:03 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: package-import@ubuntu.com-20110909140103-hqokx61534tas9rg
Tags: 2.5.3.SP1-1
* Newer but not newest upstream release. Do not build samples.
* Change debian/watch to upstream's svn repo.
* Add patch to fix compile error caused by tomcat update.
  (Closes: #628303)
* Switch to source format 3.0.
* Switch to debhelper level 7.
* Remove useless Depends.
* Update Standards-Version: 3.9.2.
* Update README.source.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package org.jboss.test.remoting.transport.http.chunked;
 
2
 
 
3
import org.jboss.test.remoting.transport.InvokerTestDriver;
 
4
import org.jboss.test.remoting.performance.synchronous.PerformanceTestCase;
 
5
 
 
6
/**
 
7
 * @author <a href="mailto:tom.elrod@jboss.com">Tom Elrod</a>
 
8
 */
 
9
public class Chunked2TestCase extends InvokerTestDriver
 
10
{
 
11
   public void declareTestClasses()
 
12
   {
 
13
      addTestClasses(ChunkedClient2.class.getName(),
 
14
                     1,
 
15
                     ChunkedServer.class.getName());
 
16
   }
 
17
   /**
 
18
    * How long to wait for test results to be returned from the client(s).  If goes longer than the
 
19
    * specified limit, will throw an exception and kill the running test cases.  Default value is
 
20
    * RESULTS_TIMEOUT.
 
21
    *
 
22
    * @return
 
23
    */
 
24
   protected long getResultsTimeout()
 
25
   {
 
26
      long defaultTimeout = 600000; // default to 10 minutes
 
27
 
 
28
      String timeout = System.getProperty(PerformanceTestCase.RESULT_TIMEOUT);
 
29
      if(timeout != null && timeout.length() > 0)
 
30
      {
 
31
         try
 
32
         {
 
33
            defaultTimeout = Long.parseLong(timeout);
 
34
         }
 
35
         catch(NumberFormatException e)
 
36
         {
 
37
            System.out.println("Can not use " + timeout + " as timeout value as is not a number");
 
38
         }
 
39
      }
 
40
      return defaultTimeout;
 
41
   }
 
42
 
 
43
   /**
 
44
    * How long for the server test case to wait for tear down message.  If exceeds timeout,
 
45
    * will throw exception.  The default value is TEARDOWN_TIMEOUT.
 
46
    *
 
47
    * @return
 
48
    */
 
49
   protected long getTearDownTimeout()
 
50
   {
 
51
      long defaultTimeout = 600000; // default to 10 minutes
 
52
 
 
53
      String timeout = System.getProperty(PerformanceTestCase.TEAR_DOWN_TIMEOUT);
 
54
      if(timeout != null && timeout.length() > 0)
 
55
      {
 
56
         try
 
57
         {
 
58
            defaultTimeout = Long.parseLong(timeout);
 
59
         }
 
60
         catch(NumberFormatException e)
 
61
         {
 
62
            System.out.println("Can not use " + timeout + " as timeout value as is not a number");
 
63
         }
 
64
      }
 
65
      return defaultTimeout;
 
66
   }
 
67
 
 
68
   /**
 
69
    * How long to allow each of the test cases to run their tests.  If exceeds this timeout
 
70
    * will throw exception and kill tests.  The default value is RUN_TEST_TIMEOUT.
 
71
    *
 
72
    * @return
 
73
    */
 
74
   protected long getRunTestTimeout()
 
75
   {
 
76
      long defaultTimeout = 600000; // default to 10 minutes
 
77
 
 
78
      String timeout = System.getProperty(PerformanceTestCase.RUN_TEST_TIMEOUT);
 
79
      if(timeout != null && timeout.length() > 0)
 
80
      {
 
81
         try
 
82
         {
 
83
            defaultTimeout = Long.parseLong(timeout);
 
84
         }
 
85
         catch(NumberFormatException e)
 
86
         {
 
87
            System.out.println("Can not use " + timeout + " as timeout value as is not a number");
 
88
         }
 
89
      }
 
90
      return defaultTimeout;
 
91
   }
 
92
 
 
93
}