db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r470221 - in /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi: ResultSetCloseTest.java UpdateXXXTest.java
Date Thu, 02 Nov 2006 04:13:49 GMT
Author: djd
Date: Wed Nov  1 20:13:48 2006
New Revision: 470221

URL: http://svn.apache.org/viewvc?view=rev&rev=470221
Log:
DERBY-2021 (partial) Fix UpdateXXXTest and ResultSetCloseTest suite() methods to run in client
as well.

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

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ResultSetCloseTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ResultSetCloseTest.java?view=diff&rev=470221&r1=470220&r2=470221
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ResultSetCloseTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ResultSetCloseTest.java
Wed Nov  1 20:13:48 2006
@@ -24,6 +24,7 @@
 import junit.framework.*;
 
 import org.apache.derbyTesting.junit.BaseJDBCTestCase;
+import org.apache.derbyTesting.junit.TestConfiguration;
 
 import java.sql.*;
 
@@ -115,19 +116,17 @@
     
     /**
      * Create test suite for this test.
+     * Run in both embedded and client.
      */
     public static Test suite() {
-        
-        TestSuite suite = new TestSuite("ResultSetCloseTest");
-        
+                
         // DB2 client doesn't implement result set closing
         // correctly wrt ensuring all its methods subsequently
         // throw an exception.
         if (usingDerbyNet())
-            return suite;
+            return new TestSuite("empty");
         
-        suite.addTestSuite(ResultSetCloseTest.class);
-        return suite;
+        return TestConfiguration.defaultSuite(ResultSetCloseTest.class);
     }
     
 }

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/UpdateXXXTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/UpdateXXXTest.java?view=diff&rev=470221&r1=470220&r2=470221
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/UpdateXXXTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/UpdateXXXTest.java
Wed Nov  1 20:13:48 2006
@@ -21,6 +21,7 @@
 
 import org.apache.derbyTesting.junit.BaseJDBCTestCase;
 import org.apache.derbyTesting.junit.JDBC;
+import org.apache.derbyTesting.junit.TestConfiguration;
 
 import java.sql.ResultSet;
 import java.sql.SQLException;
@@ -50,13 +51,31 @@
         super(name);
     }
     
+    /**
+     * Run in both embedded and client.
+     */
     public static Test suite() {
-        TestSuite suite = new TestSuite("UpdateXXXTest");
         
         // DB2 client doesn't support this functionality
         if (usingDerbyNet())
-            return suite;
+            return new TestSuite("empty");
+        
+        TestSuite suite = baseSuite("UpdateXXXTest");
         
+        suite.addTest(
+                TestConfiguration.clientServerDecorator(
+                        baseSuite("UpdateXXXTest:client")));
+                      
+        return suite;
+    }
+    
+    /**
+     * Base suite of tests that will run in both embedded and client.
+     * @param name Name for the suite.
+     */
+    private static TestSuite baseSuite(String name) {
+        TestSuite suite = new TestSuite(name);
+          
         suite.addTestSuite(UpdateXXXTest.class);
         
         // requires java.math.BigDecimal
@@ -65,7 +84,6 @@
                       
         return suite;
     }
- 
 
     /**
      * The setup creates a Connection to the database, and also



Mime
View raw message