geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r432407 - in /geronimo/trunk/modules/connector/src/test/org/apache/geronimo/connector: outbound/ConnectionManagerStressTest.java work/PooledWorkManagerTest.java
Date Thu, 17 Aug 2006 22:00:08 GMT
Author: jdillon
Date: Thu Aug 17 15:00:07 2006
New Revision: 432407

URL: http://svn.apache.org/viewvc?rev=432407&view=rev
Log:
Use logging instead of System.out

Modified:
    geronimo/trunk/modules/connector/src/test/org/apache/geronimo/connector/outbound/ConnectionManagerStressTest.java
    geronimo/trunk/modules/connector/src/test/org/apache/geronimo/connector/work/PooledWorkManagerTest.java

Modified: geronimo/trunk/modules/connector/src/test/org/apache/geronimo/connector/outbound/ConnectionManagerStressTest.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/connector/src/test/org/apache/geronimo/connector/outbound/ConnectionManagerStressTest.java?rev=432407&r1=432406&r2=432407&view=diff
==============================================================================
--- geronimo/trunk/modules/connector/src/test/org/apache/geronimo/connector/outbound/ConnectionManagerStressTest.java
(original)
+++ geronimo/trunk/modules/connector/src/test/org/apache/geronimo/connector/outbound/ConnectionManagerStressTest.java
Thu Aug 17 15:00:07 2006
@@ -75,7 +75,7 @@
                                 long duration = System.currentTimeMillis() - start;
                                 if (duration > 100) {
                                     localSlowCount++;
-                                    System.out.println("got a cx: " + i + ", time: " + (duration));
+                                    log.debug("got a cx: " + i + ", time: " + (duration));
                                 }
                             } catch (Throwable throwable) {
                                 throwable.printStackTrace();
@@ -112,8 +112,7 @@
             while (stoppedThreads < threadCount) stopBarrier.wait();
         }
         long duration = System.currentTimeMillis() - startTime;
-        log.info("no tx run, thread count: " + threadCount + ", connection count: " + repeatCount
+ ", duration: " + duration + ", total duration: " + totalDuration + ", ms per cx request:
" + (totalDuration / (threadCount * repeatCount)));
-        System.out.println("no tx run, thread count: " + threadCount + ", connection count:
" + repeatCount + ", duration: " + duration + ", total duration: " + totalDuration + ", ms
per cx request: " + (totalDuration / (threadCount * repeatCount)) + ", slow cx request count:
" + slowCount);
+        log.debug("no tx run, thread count: " + threadCount + ", connection count: " + repeatCount
+ ", duration: " + duration + ", total duration: " + totalDuration + ", ms per cx request:
" + (totalDuration / (threadCount * repeatCount)) + ", slow cx request count: " + slowCount);
         //return startTime;
         if (e != null) {
             throw e;

Modified: geronimo/trunk/modules/connector/src/test/org/apache/geronimo/connector/work/PooledWorkManagerTest.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/connector/src/test/org/apache/geronimo/connector/work/PooledWorkManagerTest.java?rev=432407&r1=432406&r2=432407&view=diff
==============================================================================
--- geronimo/trunk/modules/connector/src/test/org/apache/geronimo/connector/work/PooledWorkManagerTest.java
(original)
+++ geronimo/trunk/modules/connector/src/test/org/apache/geronimo/connector/work/PooledWorkManagerTest.java
Thu Aug 17 15:00:07 2006
@@ -28,6 +28,8 @@
 import org.apache.geronimo.pool.ThreadPool;
 import org.apache.geronimo.transaction.manager.GeronimoTransactionManager;
 import org.apache.geronimo.transaction.manager.XAWork;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 /**
  * Timing is crucial for this test case, which focuses on the synchronization
@@ -37,6 +39,8 @@
  */
 public class PooledWorkManagerTest extends TestCase {
 
+    private static final Log log = LogFactory.getLog(PooledWorkManagerTest.class);
+
     private GeronimoWorkManager workManager;
 
     protected void setUp() throws Exception {
@@ -236,22 +240,22 @@
 
         public void workAccepted(WorkEvent e) {
             acceptedEvent = e;
-            System.out.println("accepted" + e);
+            log.debug("accepted" + e);
         }
 
         public void workRejected(WorkEvent e) {
             rejectedEvent = e;
-            System.out.println("rejected" + e);
+            log.debug("rejected" + e);
         }
 
         public void workStarted(WorkEvent e) {
             startedEvent = e;
-            System.out.println("started" + e);
+            log.debug("started" + e);
         }
 
         public void workCompleted(WorkEvent e) {
             completedEvent = e;
-            System.out.println("completed" + e);
+            log.debug("completed" + e);
         }
     }
 }



Mime
View raw message