db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From krist...@apache.org
Subject svn commit: r628102 - in /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi: ClientConnectionPoolDataSourceTest.java _Suite.java
Date Fri, 15 Feb 2008 16:16:11 GMT
Author: kristwaa
Date: Fri Feb 15 08:16:11 2008
New Revision: 628102

URL: http://svn.apache.org/viewvc?rev=628102&view=rev
Log:
DERBY-3326: Add 'maxStatements' property to ClientConnectionPoolDataSource.
Enabled the test jdbcapi.ClientConnectionPoolDataSourceTest, removed two unused imports from
_Suite and removed the workaround for DERBY-3306.
Patch file: derby-3325-2a-enable_test_and_remove_workaround.diff 
(I added one missing space character to the diff)

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ClientConnectionPoolDataSourceTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/_Suite.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ClientConnectionPoolDataSourceTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ClientConnectionPoolDataSourceTest.java?rev=628102&r1=628101&r2=628102&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ClientConnectionPoolDataSourceTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ClientConnectionPoolDataSourceTest.java
Fri Feb 15 08:16:11 2008
@@ -38,8 +38,7 @@
 import org.apache.derbyTesting.junit.TestConfiguration;
 
 /**
- * Basic tests of the <code>ConnectionPoolDataSource</code> in the client
- * driver.
+ * Basic tests of the {@code ConnectionPoolDataSource} in the client driver.
  */
 public class ClientConnectionPoolDataSourceTest
     extends BaseJDBCTestCase {
@@ -49,8 +48,7 @@
     }
 
     /**
-     * Verify that handling of the <code>maxStatements</code> property is
-     * working.
+     * Verify that handling of the {@code maxStatements} property is working.
      */
     public void testMaxStatementsProperty() {
         ClientConnectionPoolDataSource cDs =
@@ -113,17 +111,7 @@
      */
     private void verifyConnection(ClientConnectionPoolDataSource cDs)
             throws SQLException {
-        PooledConnection pc = null;
-        // Workaround for "bug" in the JUnit framework, where data source
-        // connections do not create the database if it does not exist.
-        // See DERBY-3306 for more information.
-        try {
-            pc = cDs.getPooledConnection();
-        } catch (SQLException sqle) {
-            assertSQLState("08004", sqle);
-            getConnection();
-            pc = cDs.getPooledConnection();
-        }
+        PooledConnection pc = cDs.getPooledConnection();
         // Get a connection and make sure we can access the database.
         Connection con = pc.getConnection();
         Statement stmt = con.createStatement();

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/_Suite.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/_Suite.java?rev=628102&r1=628101&r2=628102&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/_Suite.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/_Suite.java
Fri Feb 15 08:16:11 2008
@@ -23,8 +23,6 @@
 
 import org.apache.derbyTesting.junit.BaseTestCase;
 import org.apache.derbyTesting.junit.JDBC;
-import org.apache.derbyTesting.junit.NetworkServerTestSetup;
-import org.apache.derbyTesting.junit.TestConfiguration;
 
 import junit.framework.Test; 
 import junit.framework.TestSuite;
@@ -121,6 +119,8 @@
             // Test uses DriverManager, Pooled and XADataSources, and
             // an inner class implements ConnectionEventListener.
             suite.addTest(J2EEDataSourceTest.suite());
+            // Test requires ClientConnectionPoolDataSource.
+            suite.addTest(ClientConnectionPoolDataSourceTest.suite());
 
             //suite to test updatable reader for clob in embedded driver
             suite.addTest (ClobUpdatableReaderTest.suite());



Mime
View raw message