1 package org.apache.ojb.ejb.pb; 2 3 17 18 import junit.framework.TestCase; 19 import org.apache.commons.lang.SystemUtils; 20 21 27 public class StressTestClient extends TestCase 28 { 29 public StressTestClient(String name) 30 { 31 super(name); 32 } 33 34 public static void main(String [] args) 35 { 36 String [] arr = {StressTestClient.class.getName()}; 37 junit.textui.TestRunner.main(arr); 38 } 39 40 public void testStressPB() throws Exception 41 { 42 int loops = 2; 43 int concurrentThreads = 10; 44 int objectsPerThread = 200; 45 String eol = SystemUtils.LINE_SEPARATOR; 46 for (int i = 0; i < loops; i++) 47 { 48 System.out.println(eol + "## perform loop " + (i + 1) + " ##"); 49 StressTest.performTest(new int[]{concurrentThreads, objectsPerThread}); 50 } 51 } 52 } 53 | Popular Tags |