You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2019/02/10 14:01:09 UTC
[commons-dbcp] branch master updated: Be more quiet during tests on
the console.
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-dbcp.git
The following commit(s) were added to refs/heads/master by this push:
new 3bddc5c Be more quiet during tests on the console.
3bddc5c is described below
commit 3bddc5c5321e492835413bf4e8c9b3caafe4fb68
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun Feb 10 09:01:05 2019 -0500
Be more quiet during tests on the console.
---
.../commons/dbcp2/TestParallelCreationWithNoIdle.java | 14 ++++++--------
.../dbcp2/datasources/TestSharedPoolDataSource.java | 3 +--
2 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/src/test/java/org/apache/commons/dbcp2/TestParallelCreationWithNoIdle.java b/src/test/java/org/apache/commons/dbcp2/TestParallelCreationWithNoIdle.java
index 7e26c35..f39bcae 100644
--- a/src/test/java/org/apache/commons/dbcp2/TestParallelCreationWithNoIdle.java
+++ b/src/test/java/org/apache/commons/dbcp2/TestParallelCreationWithNoIdle.java
@@ -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) {
diff --git a/src/test/java/org/apache/commons/dbcp2/datasources/TestSharedPoolDataSource.java b/src/test/java/org/apache/commons/dbcp2/datasources/TestSharedPoolDataSource.java
index 8862a71..60aba45 100644
--- a/src/test/java/org/apache/commons/dbcp2/datasources/TestSharedPoolDataSource.java
+++ b/src/test/java/org/apache/commons/dbcp2/datasources/TestSharedPoolDataSource.java
@@ -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);