User: user57  
  Date: 02/02/14 22:15:52

  Modified:    src/main/org/jboss/test/jbossmx/performance/dynamic
                        InvocationTestCase.java
  Log:
   o replaced most System.out usage with Log4j.  should really introduce
     some base classes to make this mess more maintainable...
  
  Revision  Changes    Path
  1.2       +17 -16    
jbosstest/src/main/org/jboss/test/jbossmx/performance/dynamic/InvocationTestCase.java
  
  Index: InvocationTestCase.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jbosstest/src/main/org/jboss/test/jbossmx/performance/dynamic/InvocationTestCase.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- InvocationTestCase.java   2 Feb 2002 03:16:25 -0000       1.1
  +++ InvocationTestCase.java   15 Feb 2002 06:15:52 -0000      1.2
  @@ -16,6 +16,7 @@
   public class InvocationTestCase
      extends TestCase
   {
  +   org.apache.log4j.Category log = 
org.apache.log4j.Category.getInstance(getClass());
   
      public InvocationTestCase(String s)
      {
  @@ -26,9 +27,9 @@
      {
         try
         {
  -         System.out.println("\nDYNAMIC: void invocation with DefaultDomain");
  -         System.out.println(ITERATION_COUNT + " Invocations, Repeat: x" + 
REPEAT_COUNT);
  -         System.out.println("(this may take a while...)\n");
  +         log.debug("\nDYNAMIC: void invocation with DefaultDomain");
  +         log.debug(ITERATION_COUNT + " Invocations, Repeat: x" + REPEAT_COUNT);
  +         log.debug("(this may take a while...)\n");
   
            MBeanServer server = MBeanServerFactory.createMBeanServer();
            ObjectName name = new ObjectName(":performanceTest=dynamic");
  @@ -56,7 +57,7 @@
               }
            }
   
  -         System.out.println("\nAverage: " + (avg/REPEAT_COUNT));
  +         log.debug("\nAverage: " + (avg/REPEAT_COUNT));
         }
         catch (Throwable t)
         {
  @@ -69,9 +70,9 @@
      {
         try
         {
  -         System.out.println("\nDYNAMIC: void invocation");
  -         System.out.println(ITERATION_COUNT + " Invocations, Repeat: x" + 
REPEAT_COUNT);
  -         System.out.println("(this may take a while...)\n");
  +         log.debug("\nDYNAMIC: void invocation");
  +         log.debug(ITERATION_COUNT + " Invocations, Repeat: x" + REPEAT_COUNT);
  +         log.debug("(this may take a while...)\n");
   
            MBeanServer server = MBeanServerFactory.createMBeanServer();
            ObjectName name = new ObjectName("Domain:performanceTest=dynamic");
  @@ -99,7 +100,7 @@
               }
            }
   
  -         System.out.println("\nAverage: " + (avg/REPEAT_COUNT));
  +         log.debug("\nAverage: " + (avg/REPEAT_COUNT));
         }
         catch (Throwable t)
         {
  @@ -112,9 +113,9 @@
      {
         try
         {
  -         System.out.println("\nDYNAMIC: counter invocation");
  -         System.out.println(ITERATION_COUNT + " Invocations, Repeat: x" + 
REPEAT_COUNT);
  -         System.out.println("(this may take a while...)\n");
  +         log.debug("\nDYNAMIC: counter invocation");
  +         log.debug(ITERATION_COUNT + " Invocations, Repeat: x" + REPEAT_COUNT);
  +         log.debug("(this may take a while...)\n");
   
            MBeanServer server = MBeanServerFactory.createMBeanServer();
            ObjectName name = new ObjectName("Domain:performanceTest=dynamic");
  @@ -143,7 +144,7 @@
               }
            }
   
  -         System.out.println("\nAverage: " + (avg/REPEAT_COUNT));
  +         log.debug("\nAverage: " + (avg/REPEAT_COUNT));
   
            assertTrue(mbean.getCount() == (REPEAT_COUNT + 1)*ITERATION_COUNT);
         }
  @@ -159,9 +160,9 @@
      {
         try
         {
  -         System.out.println("\nDYNAMIC: mixed arguments invocation");
  -         System.out.println(ITERATION_COUNT + " Invocations, Repeat: x" + 
REPEAT_COUNT);
  -         System.out.println("(this may take a while...)\n");
  +         log.debug("\nDYNAMIC: mixed arguments invocation");
  +         log.debug(ITERATION_COUNT + " Invocations, Repeat: x" + REPEAT_COUNT);
  +         log.debug("(this may take a while...)\n");
   
            MBeanServer server = MBeanServerFactory.createMBeanServer();
            ObjectName name    = new ObjectName("Domain:performanceTest=dynamic");
  @@ -223,7 +224,7 @@
               }
            }
   
  -         System.out.println("\nAverage: " + (avg/REPEAT_COUNT));
  +         log.debug("\nAverage: " + (avg/REPEAT_COUNT));
   
         }
         catch (Throwable t)
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to