1 package org.apache.ojb.ejb.odmg; 2 3 17 18 import org.apache.commons.lang.SystemUtils; 19 import junit.framework.TestCase; 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 = 3; 43 int concurrentThreads = 10; 44 int objectsPerThread = 200; 45 46 String eol = SystemUtils.LINE_SEPARATOR; 47 for (int i = 0; i < loops; i++) 48 { 49 System.out.println(eol + "## perform loop " + (i + 1) + " ##"); 50 StressTest.performTest(new int[]{concurrentThreads, objectsPerThread}); 51 } 52 } 53 } 54 | Popular Tags |