db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From myrn...@apache.org
Subject svn commit: r1628101 - /db/derby/code/branches/10.10/java/testing/org/apache/derbyTesting/functionTests/tests/memorydb/Derby6662Test.java
Date Sun, 28 Sep 2014 21:16:21 GMT
Author: myrnavl
Date: Sun Sep 28 21:16:21 2014
New Revision: 1628101

URL: http://svn.apache.org/r1628101
Log:
DERBY-6662; DatabaseMetaData.usesLocalFiles() returns true for in-memory databases
   preventing the optional tools test case to run with JDBC lower than 4

Modified:
    db/derby/code/branches/10.10/java/testing/org/apache/derbyTesting/functionTests/tests/memorydb/Derby6662Test.java

Modified: db/derby/code/branches/10.10/java/testing/org/apache/derbyTesting/functionTests/tests/memorydb/Derby6662Test.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.10/java/testing/org/apache/derbyTesting/functionTests/tests/memorydb/Derby6662Test.java?rev=1628101&r1=1628100&r2=1628101&view=diff
==============================================================================
--- db/derby/code/branches/10.10/java/testing/org/apache/derbyTesting/functionTests/tests/memorydb/Derby6662Test.java
(original)
+++ db/derby/code/branches/10.10/java/testing/org/apache/derbyTesting/functionTests/tests/memorydb/Derby6662Test.java
Sun Sep 28 21:16:21 2014
@@ -22,10 +22,11 @@
 package org.apache.derbyTesting.functionTests.tests.memorydb;
 
 import junit.framework.Test;
+import junit.framework.TestSuite;
+
 import java.sql.Connection;
 import java.sql.DatabaseMetaData;
 import java.sql.DriverManager;
-import java.sql.PreparedStatement;
 import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.sql.Statement;
@@ -39,7 +40,17 @@ public class Derby6662Test extends BaseJ
     public Derby6662Test(String name) { super(name); }
     
     public static Test suite() {
-      return TestConfiguration.defaultSuite(Derby6662Test.class);
+        if (!JDBC.vmSupportsJDBC4())  
+        {
+            // optional tools testing requires at least JDBC 4.0, so skip
+            TestSuite suite = new TestSuite("Derby6662Test");
+            suite.addTest(new Derby6662Test("testDatabaseMetaDataCalls"));
+            suite.addTest(TestConfiguration.clientServerDecorator(
+                    new Derby6662Test("testDatabaseMetaDataCalls")));
+            return suite;
+        }
+        else
+            return TestConfiguration.defaultSuite(Derby6662Test.class);
     }
     
     /** Dispose of objects after testing. */



Mime
View raw message