1 /*------------------------------------------------------------------------------
2 Name: MassiveSubTestOne.java
3 Project: xmlBlaster.org
4 Copyright: xmlBlaster.org, see xmlBlaster-LICENSE file
5 Comment: Load test for xmlBlaster
6 Version: $Id: MassiveSubTestOne.java 12937 2004-11-24 20:15:11Z ruff $
7 ------------------------------------------------------------------------------*/
8 package org.xmlBlaster.test.stress;
9 import org.xmlBlaster.util.Global;
10 import junit.framework.*;
11
12 /**
13 * Run massive with with only the one connection aproach read settings from env.
14 * <p>Here is one possible setting:</p>
15 * <pre>
16 numSubscribers=2500
17 maxSubPerCon=500
18 withEmbedded=false
19 noToPub=4
20 protocol=IOR
21 </pre>
22 *
23 *
24 * @author Peter Antman
25 * @version $Revision: 1.2 $ $Date: 2004-11-24 20:15:11 +0000 (Wed, 24 Nov 2004) $
26 */
27
28 public class MassiveSubTestOne extends MassiveSubTest {
29
30
31 public MassiveSubTestOne(Global glob, String testName, String loginName, boolean useOneConnection) {
32 super(glob,testName,loginName,useOneConnection);
33 }
34 /**
35 * Method is used by TestRunner to load these tests
36 */
37 public static Test suite()
38 {
39 TestSuite suite= new TestSuite();
40 String loginName = "Tim";
41 suite.addTest(new MassiveSubTestOne(new Global(), "testManyClients", loginName,true));
42
43 return suite;
44 }
45 /**
46 * An example of how to run it:
47 java -Xms18M -Xmx256M -classpath lib/junit.jar:lib/testsuite.jar:lib/xmlBlaster.jar -Dtrace=false org.xmlBlaster.test.stress.MassiveSubTestOne -numSubscribers 2500 -maxSubPerCon 500 -protocol LOCAL -withEmbedded true > log 2>&1
48 * tail -f log | egrep 'Threads created|messages updated'
49 */
50 public static void main(String[] args) {
51 Global glob = new Global(args);
52 MassiveSubTestOne m = new MassiveSubTestOne(glob, "testManyClients", "testManyClients", true);
53 m.setUp();
54 m.testManyClients();
55 m.tearDown();
56 }
57 }
syntax highlighted by Code2HTML, v. 0.9.1