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

« back to all changes in this revision

Viewing changes to src/tests/org/jboss/test/remoting/versioning/transport/VersionInvokerTestCaseBase.java

  • Committer: Package Import Robot
  • Author(s): Torsten Werner
  • Date: 2011-09-09 14:01:03 UTC
  • mto: This revision was merged to the branch mainline in revision 9.
  • Revision ID: package-import@ubuntu.com-20110909140103-o8ucrolqt5g25k57
Tags: upstream-2.5.3.SP1
ImportĀ upstreamĀ versionĀ 2.5.3.SP1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package org.jboss.test.remoting.versioning.transport;
 
2
 
 
3
import org.apache.log4j.Level;
 
4
import org.jboss.test.remoting.transport.InvokerTestDriver;
 
5
 
 
6
/**
 
7
 * @author <a href="mailto:tom.elrod@jboss.com">Tom Elrod</a>
 
8
 */
 
9
public abstract class VersionInvokerTestCaseBase extends InvokerTestDriver
 
10
{
 
11
   /**
 
12
    * Returns the classpath to be added to the classpath used to start the client tests.
 
13
    * Default return is null, which means no extra classpath will be added.
 
14
    *
 
15
    * @return
 
16
    */
 
17
   protected String getExtendedServerClasspath()
 
18
   {
 
19
      return System.getProperty("server.path");
 
20
   }
 
21
 
 
22
   /**
 
23
    * Returns the classpath to be added to the classpath used to start the client tests.
 
24
    * Default return is null, which means no extra classpath will be added.
 
25
    *
 
26
    * @return
 
27
    */
 
28
   protected String getExtendedClientClasspath()
 
29
   {
 
30
      return System.getProperty("client.path");
 
31
   }
 
32
   
 
33
   protected String getClientJVMArguments()
 
34
   {
 
35
      String prop = System.getProperty("client.pre_2_0_compatible");
 
36
      String args = "";
 
37
      if (prop != null && !"".equals(prop))
 
38
      {
 
39
         args = "-Djboss.remoting.pre_2_0_compatible=" + prop;
 
40
      }
 
41
      else
 
42
      {
 
43
         prop = System.getProperty("client.version");
 
44
         if (prop != null && !"".equals(prop))
 
45
            args = "-Djboss.remoting.version=" + prop;
 
46
      }
 
47
      prop = System.getProperty("client.check_connection");
 
48
      if (prop != null && !"".equals(prop))
 
49
      {
 
50
         args += " -Dremoting.metadata=socket.check_connection=" + prop;
 
51
      }
 
52
      System.out.println("client arg: " + args);
 
53
      return args;
 
54
   }
 
55
 
 
56
 
 
57
   protected String getServerJVMArguments()
 
58
   {
 
59
      String prop = System.getProperty("server.pre_2_0_compatible");
 
60
      String args = "";
 
61
      if (prop != null && !"".equals(prop))
 
62
      {
 
63
         args = "-Djboss.remoting.pre_2_0_compatible=" + prop;
 
64
      }
 
65
      else
 
66
      {
 
67
         prop = System.getProperty("server.version");
 
68
         if (prop != null && !"".equals(prop))
 
69
            args = "-Djboss.remoting.version=" + prop;
 
70
      }
 
71
      prop = System.getProperty("server.check_connection");
 
72
      if (prop != null && !"".equals(prop))
 
73
      {
 
74
         args += " -Dremoting.metadata=socket.check_connection=" + prop;
 
75
      }
 
76
      System.out.println("server arg: " + args);
 
77
      return args;
 
78
   }
 
79
   
 
80
 
 
81
   protected Level getTestHarnessLogLevel()
 
82
   {
 
83
      return Level.DEBUG;
 
84
   }
 
85
 
 
86
   protected Level getTestLogLevel()
 
87
   {
 
88
      return Level.DEBUG;
 
89
   }
 
90
 
 
91
   /**
 
92
    * How long to wait for test results to be returned from the client(s).  If goes longer than the
 
93
    * specified limit, will throw an exception and kill the running test cases.  Default value is
 
94
    * RESULTS_TIMEOUT.
 
95
    *
 
96
    * @return
 
97
    */
 
98
   protected long getResultsTimeout()
 
99
   {
 
100
      return 60000;
 
101
   }
 
102
 
 
103
   /**
 
104
    * How long for the server test case to wait for tear down message.  If exceeds timeout,
 
105
    * will throw exception.  The default value is TEARDOWN_TIMEOUT.
 
106
    *
 
107
    * @return
 
108
    */
 
109
   protected long getTearDownTimeout()
 
110
   {
 
111
      return 60000;
 
112
   }
 
113
 
 
114
   /**
 
115
    * How long to allow each of the test cases to run their tests.  If exceeds this timeout
 
116
    * will throw exception and kill tests.  The default value is RUN_TEST_TIMEOUT.
 
117
    *
 
118
    * @return
 
119
    */
 
120
   protected long getRunTestTimeout()
 
121
   {
 
122
      return 60000;
 
123
   }
 
124
 
 
125
 
 
126
}