1 22 package test.performance.standard; 23 24 import junit.framework.Test; 25 import junit.framework.TestSuite; 26 27 import javax.management.JMException ; 28 import javax.management.MBeanServer ; 29 import javax.management.MBeanServerFactory ; 30 import javax.management.ObjectName ; 31 32 38 public class StandardSUITE extends TestSuite 39 { 40 public static void main(String [] args) 41 { 42 junit.textui.TestRunner.run(suite()); 43 } 44 45 public static Test suite() 46 { 47 TestSuite suite = new TestSuite("Performance tests for Standard MBeans"); 48 49 try 50 { 51 MBeanServer server = MBeanServerFactory.createMBeanServer(); 52 53 if ("JBossMX".equalsIgnoreCase((String )server.getAttribute(new ObjectName ("JMImplementation:type=MBeanServerDelegate"), "ImplementationName"))) 54 { 55 suite.addTest(new TestSuite(OptimizedThroughputTEST.class)); 57 } 58 } 59 catch (JMException e) 60 { 61 System.err.println("Unable to run optimized tests: " + e.toString()); 62 } 63 64 65 suite.addTest(new TestSuite(ThroughputTEST.class)); 67 suite.addTest(new TestSuite(StandardMBeanThroughputTEST.class)); 68 69 return suite; 70 } 71 72 } 73 | Popular Tags |