Be more quiet during tests on the console.
authorGary Gregory <gardgregory@gmail.com>
Sun, 10 Feb 2019 14:01:05 +0000 (09:01 -0500)
committerGary Gregory <gardgregory@gmail.com>
Sun, 10 Feb 2019 14:01:05 +0000 (09:01 -0500)
src/test/java/org/apache/commons/dbcp2/TestParallelCreationWithNoIdle.java
src/test/java/org/apache/commons/dbcp2/datasources/TestSharedPoolDataSource.java

index 7e26c35..f39bcae 100644 (file)
@@ -111,24 +111,22 @@ public class TestParallelCreationWithNoIdle  {
 
         @Override
         public void run() {
-            System.out.println("Thread started " + Thread.currentThread().toString());
-            for(int i = 0; i< iter; i++) {
+            // System.out.println("Thread started " + Thread.currentThread().toString());
+            for (int i = 0; i < iter; i++) {
                 sleepMax(delay);
                 try (Connection conn = ds.getConnection();
-                     PreparedStatement stmt = conn.prepareStatement(
-                             "select 'literal', SYSDATE from dual");
-                     ) {
-                    System.out.println("Got Connection " + Thread.currentThread().toString());
+                        PreparedStatement stmt = conn.prepareStatement("select 'literal', SYSDATE from dual");) {
+                    // System.out.println("Got Connection " + Thread.currentThread().toString());
                     final ResultSet rset = stmt.executeQuery();
                     rset.next();
                     sleepMax(delayAfter);
                     rset.close();
-                } catch(final Exception e) {
+                } catch (final Exception e) {
                     e.printStackTrace();
                     throw new RuntimeException(e);
                 }
             }
-            System.out.println("Thread done " + Thread.currentThread().toString());
+            // System.out.println("Thread done " + Thread.currentThread().toString());
         }
 
         private void sleepMax(final int timeMax) {
index 8862a71..60aba45 100644 (file)
@@ -345,8 +345,7 @@ public class TestSharedPoolDataSource extends TestConnectionPool {
 
         final long end = System.currentTimeMillis();
 
-        System.out.println("testMaxWaitMillis took " + (end-start) +
-                " ms. maxWaitMillis: "+maxWaitMillis);
+        // System.out.println("testMaxWaitMillis took " + (end - start) + " ms. maxWaitMillis: " + maxWaitMillis);
 
         // Threads should time out in parallel - allow double that to be safe
         assertTrue(end-start < 2 * maxWaitMillis);