KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > remoting > performance > oneway > ServerOnewayInvocationTestCase


1 /*
2  * JBoss, the OpenSource J2EE webOS
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  */

7 package org.jboss.remoting.performance.oneway;
8
9 import junit.framework.Test;
10 import junit.framework.TestSuite;
11 import junit.textui.TestRunner;
12 import org.apache.log4j.Level;
13 import org.jboss.remoting.performance.PerformanceInvokerServer;
14 import org.jboss.remoting.performance.PerformanceTest;
15
16 /**
17  * This should be used as the main test case for the oneway invoker client/server.
18  * It will start one instance of the client and one of the server and will
19  * gather the test results and report them in standard JUnit format. When
20  * wanting to run JUnit test for oneway invoker, this is the class to use.
21  *
22  * @author <a HREF="mailto:telrod@e2technologies.net">Tom Elrod</a>
23  */

24 public class ServerOnewayInvocationTestCase extends PerformanceTest
25 {
26    public ServerOnewayInvocationTestCase(String JavaDoc name)
27    {
28       super(name);
29    }
30
31
32    public String JavaDoc getClientFQN()
33    {
34       return ServerOnewayInvocationTest.class.getName();
35    }
36
37    public String JavaDoc getServerFQN()
38    {
39       return PerformanceInvokerServer.class.getName();
40    }
41
42    public static Test suite()
43    {
44       return new TestSuite(ServerOnewayInvocationTestCase.class);
45    }
46
47    public static void main(String JavaDoc[] args)
48    {
49       org.apache.log4j.BasicConfigurator.configure();
50       org.apache.log4j.Category.getRoot().setLevel(Level.INFO);
51       org.apache.log4j.Category.getInstance("org.jgroups").setLevel(Level.INFO);
52       org.apache.log4j.Category.getInstance("org.jboss.remoting").setLevel(Level.DEBUG);
53       org.apache.log4j.Category.getInstance("test").setLevel(Level.DEBUG);
54
55       TestRunner.run(suite());
56       System.exit(0);
57    }
58
59
60 }
Popular Tags