db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From myrn...@apache.org
Subject svn commit: r1627851 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/memorydb/Derby6662Test.java
Date Fri, 26 Sep 2014 18:11:25 GMT
Author: myrnavl
Date: Fri Sep 26 18:11:25 2014
New Revision: 1627851

URL: http://svn.apache.org/r1627851
Log:
DERBY-6662; DatabaseMetaData.usesLocalFiles() returns true for in-memory databases
   Adding a test case using the metadata optional tool.

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

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/memorydb/Derby6662Test.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/memorydb/Derby6662Test.java?rev=1627851&r1=1627850&r2=1627851&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/memorydb/Derby6662Test.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/memorydb/Derby6662Test.java
Fri Sep 26 18:11:25 2014
@@ -41,6 +41,7 @@ public class Derby6662Test extends BaseJ
     protected void tearDown() throws Exception
     {
       super.tearDown();
+      dropInMemoryDb();
     }
     
     public void testDatabaseMetaDataCalls() throws SQLException
@@ -50,6 +51,22 @@ public class Derby6662Test extends BaseJ
         assertFalse(dmd.usesLocalFiles());
     }
     
+    public void testOptionalToolMetaData() throws SQLException
+    {
+        Connection conn = obtainConnection();
+        // register the database metadata wrapper
+        goodStatement( conn, "call syscs_util.syscs_register_tool" +
+            "('databaseMetaData', true)");
+        // run the routines
+        assertResults(conn,"values usesLocalFiles()",
+             new String[][]{ { "false" }},false);
+        assertResults(conn,"values usesLocalFilePerTable()",
+             new String[][]{ { "false" }},false);
+        // unregister the database metadata wrapper
+        goodStatement( conn, "call syscs_util.syscs_register_tool" +
+            "('databaseMetaData', false)");
+    }
+    
     private DatabaseMetaData getDMD() throws SQLException
     {
         return obtainConnection().getMetaData();



Mime
View raw message