commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pste...@apache.org
Subject svn commit: r884178 - /commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp/TestAbandonedBasicDataSource.java
Date Wed, 25 Nov 2009 16:26:07 GMT
Author: psteitz
Date: Wed Nov 25 16:26:06 2009
New Revision: 884178

URL: http://svn.apache.org/viewvc?rev=884178&view=rev
Log:
Eliminated needless System.err noise.

Modified:
    commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp/TestAbandonedBasicDataSource.java

Modified: commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp/TestAbandonedBasicDataSource.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp/TestAbandonedBasicDataSource.java?rev=884178&r1=884177&r2=884178&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp/TestAbandonedBasicDataSource.java
(original)
+++ commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp/TestAbandonedBasicDataSource.java
Wed Nov 25 16:26:06 2009
@@ -56,37 +56,14 @@
 
     // ---------- Abandoned Test -----------
 
-    private void getConnection1() throws Exception {
-        System.err.println("BEGIN getConnection1()");
-        Connection conn = ds.getConnection();
-        System.err.println("conn: " + conn);
-        System.err.println("END getConnection1()");
-    }
-
-    private void getConnection2() throws Exception {
-        System.err.println("BEGIN getConnection2()");
-        Connection conn = ds.getConnection();
-        System.err.println("conn: " + conn);
-        System.err.println("END getConnection2()");
-    }
-
-    private void getConnection3() throws Exception {
-        System.err.println("BEGIN getConnection3()");
-        Connection conn = ds.getConnection();
-        System.err.println("conn: " + conn);
-        System.err.println("END getConnection3()");
-    }
-
     public void testAbandoned() throws Exception {
         // force abandoned
         ds.setRemoveAbandonedTimeout(0);
         ds.setMaxActive(1);
 
-        System.err.println("----------------------------------------");
-        getConnection1();
-        getConnection2();
-        getConnection3();
-        System.err.println("----------------------------------------");
+        for (int i = 0; i < 3; i++) {
+            assertNotNull(ds.getConnection());
+        }
     }
     
     public void testAbandonedClose() throws Exception {



Mime
View raw message