tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1166721 - /tomcat/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/ConnectCountTest.java
Date Thu, 08 Sep 2011 14:54:53 GMT
Author: markt
Date: Thu Sep  8 14:54:52 2011
New Revision: 1166721

URL: http://svn.apache.org/viewvc?rev=1166721&view=rev
Log:
Fix Eclipse warnings

Modified:
    tomcat/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/ConnectCountTest.java

Modified: tomcat/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/ConnectCountTest.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/ConnectCountTest.java?rev=1166721&r1=1166720&r2=1166721&view=diff
==============================================================================
--- tomcat/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/ConnectCountTest.java
(original)
+++ tomcat/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/ConnectCountTest.java
Thu Sep  8 14:54:52 2011
@@ -38,8 +38,8 @@ public class ConnectCountTest extends De
     }
     
     protected boolean run = true;
-    protected long sleep = Long.getLong("sleep", 10);
-    protected long complete = Long.getLong("complete",20000);
+    protected long sleep = Long.getLong("sleep", 10).longValue();
+    protected long complete = Long.getLong("complete",20000).longValue();
     protected boolean printthread = Boolean.getBoolean("printthread");
     CountDownLatch latch = null;
 
@@ -67,8 +67,7 @@ public class ConnectCountTest extends De
 
     protected void printThreadResults(TestThread[] threads, String name, int active, int
expected) {
         long minfetch = Long.MAX_VALUE, maxfetch = Long.MIN_VALUE, totalfetch = 0;
-        long maxwait = 0, minwait = Long.MAX_VALUE, averagewait = 0, totalwait = 0;
-        float avgfetch = 0;
+        long maxwait = 0, minwait = Long.MAX_VALUE, totalwait = 0;
         for (int i=0; i<threads.length; i++) {
             TestThread t = threads[i];
             totalfetch += t.nroffetch;
@@ -112,6 +111,7 @@ public class ConnectCountTest extends De
         this.run = false;
         long delta = System.currentTimeMillis() - start;
         printThreadResults(threads,"testDBCPThreads20Connections10",Driver.connectCount.get(),10);
+        System.out.println("Test completed in: " + delta + "ms.");
         tearDown();
     }
 
@@ -139,6 +139,7 @@ public class ConnectCountTest extends De
         this.run = false;
         long delta = System.currentTimeMillis() - start;
         printThreadResults(threads,"testPoolThreads20Connections10",Driver.connectCount.get(),10);
+        System.out.println("Test completed in: " + delta + "ms.");
         tearDown();
 
     }
@@ -168,6 +169,7 @@ public class ConnectCountTest extends De
         this.run = false;
         long delta = System.currentTimeMillis() - start;
         printThreadResults(threads,"testPoolThreads20Connections10Fair",Driver.connectCount.get(),10);
+        System.out.println("Test completed in: " + delta + "ms.");
         tearDown();
     }
  
@@ -198,6 +200,7 @@ public class ConnectCountTest extends De
         this.run = false;
         long delta = System.currentTimeMillis() - start;
         printThreadResults(threads,"testPoolThreads20Connections10FairAsync",Driver.connectCount.get(),10);
+        System.out.println("Test completed in: " + delta + "ms.");
         tearDown();
     }
     



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message