db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r432457 - in /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi: DataSourcePropertiesTest.java DataSourcePropertiesTest_app.properties _Suite.java
Date Fri, 18 Aug 2006 01:01:29 GMT
Author: djd
Date: Thu Aug 17 18:01:29 2006
New Revision: 432457

URL: http://svn.apache.org/viewvc?rev=432457&view=rev
Log:
Change DataSourcePropertiesTest to be a self describing test and not rely on the old
test harness _app.properties method. Add it and ResultSetCloseTest to jdbcapi._Suite.

Removed:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DataSourcePropertiesTest_app.properties
Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DataSourcePropertiesTest.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/DataSourcePropertiesTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DataSourcePropertiesTest.java?rev=432457&r1=432456&r2=432457&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DataSourcePropertiesTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DataSourcePropertiesTest.java
Thu Aug 17 18:01:29 2006
@@ -30,6 +30,7 @@
 import junit.framework.Test;
 import junit.framework.TestSuite;
 import org.apache.derbyTesting.functionTests.util.BaseJDBCTestCase;
+import org.apache.derbyTesting.functionTests.util.JDBC;
 import org.apache.derbyTesting.functionTests.util.TestDataSourceFactory;
 import org.apache.derbyTesting.functionTests.util.TestUtil;
 
@@ -50,20 +51,34 @@
 
     /** Creates a test suite with all test cases. */
     public static Test suite() {
+        
+        
         TestSuite suite = new TestSuite();
-        Method[] methods = DataSourcePropertiesTest.class.getMethods();
-        // Add all methods starting with 'test'.
-        // When using embedded, add all methods starting with 'embedded'.
-        for (int i = 0; i < methods.length; i++) {
-            Method m = methods[i];
-            if (m.getParameterTypes().length > 0 ||
-                    m.getReturnType() != Void.TYPE) {
-                continue;
-            }
-            String name = m.getName();
-            if (name.startsWith("test") ||
-                    (name.startsWith("embedded") && usingEmbedded())) {
-                suite.addTest(new DataSourcePropertiesTest(name));
+        
+        // TODO: Run fixtures in J2ME and JDBC2 (with extensions)
+        // that can be supported there. This disabling matches
+        // the original _app.properties file. Concern was over
+        // XA support (which is supported in JDBC 2 with extensions).
+        if (JDBC.vmSupportsJDBC3()) {
+        
+            // Add all methods starting with 'test'.
+            //suite.addTestSuite(DataSourcePropertiesTest.class);
+            
+            if (usingEmbedded()) {
+           
+                // When using embedded, add all methods starting with 'embedded'.
+                Method[] methods = DataSourcePropertiesTest.class.getMethods();
+                for (int i = 0; i < methods.length; i++) {
+                    Method m = methods[i];
+                    if (m.getParameterTypes().length > 0 ||
+                            m.getReturnType().equals(Void.TYPE)) {
+                        continue;
+                    }
+                    String name = m.getName();
+                    if (name.startsWith("embedded")) {
+                        suite.addTest(new DataSourcePropertiesTest(name));
+                    }
+                }
             }
         }
         return suite;

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=432457&r1=432456&r2=432457&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
Thu Aug 17 18:01:29 2006
@@ -52,6 +52,8 @@
 		suite.addTest(SURTest.suite());
 		suite.addTest(UpdateXXXTest.suite());
 		suite.addTestSuite(URCoveringIndexTest.class);
+        suite.addTest(ResultSetCloseTest.suite());
+        suite.addTest(DataSourcePropertiesTest.suite());
 		
 		// Tests that are compiled using 1.4 target need to
 		// be added this way, otherwise creating the suite



Mime
View raw message