1 7 package org.jboss.test.remoting.performance.asynchronous; 8 9 import java.io.IOException ; 10 import org.apache.log4j.Level; 11 import org.jboss.test.remoting.performance.synchronous.PerformanceServerTest; 12 import org.jboss.test.remoting.performance.synchronous.PerformanceTestCase; 13 14 17 public class PerformanceClientSideTestCase extends PerformanceTestCase 18 { 19 public void declareTestClasses() 20 { 21 org.apache.log4j.BasicConfigurator.configure(); 23 org.apache.log4j.Category.getRoot().setLevel(Level.DEBUG); 24 26 org.apache.log4j.SimpleLayout layout = new org.apache.log4j.SimpleLayout(); 27 28 try 29 { 30 org.apache.log4j.FileAppender fileAppender = new org.apache.log4j.FileAppender(layout, "debug_output.log"); 31 fileAppender.setThreshold(Level.DEBUG); 32 fileAppender.setAppend(false); 33 org.apache.log4j.Category.getRoot().addAppender(fileAppender); 34 } 35 catch(IOException e) 36 { 37 e.printStackTrace(); 38 } 39 41 42 43 String numOfClients = System.getProperty(NUMBER_OF_CLIENTS); 44 if(numOfClients != null && numOfClients.length() > 0) 45 { 46 try 47 { 48 numberOfClients = Integer.parseInt(numOfClients); 49 } 50 catch(NumberFormatException e) 51 { 52 e.printStackTrace(); 53 } 54 } 55 56 addTestClasses(PerformanceClientSideClientTest.class.getName(), 57 numberOfClients, 58 PerformanceServerTest.class.getName()); 59 } 60 61 } | Popular Tags |