db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r1148687 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ij3Test.java
Date Wed, 20 Jul 2011 10:29:22 GMT
Author: kahatlen
Date: Wed Jul 20 10:29:21 2011
New Revision: 1148687

URL: http://svn.apache.org/viewvc?rev=1148687&view=rev
Log:
DERBY-5346: ij3Test fails on phoneME

Make the test use a data source instead of a connection URL on
CDC/Foundation Profile.

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ij3Test.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ij3Test.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ij3Test.java?rev=1148687&r1=1148686&r2=1148687&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ij3Test.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ij3Test.java
Wed Jul 20 10:29:21 2011
@@ -27,6 +27,7 @@ import junit.framework.Test;
 
 import org.apache.derbyTesting.functionTests.util.ScriptTestCase;
 import org.apache.derbyTesting.junit.CleanDatabaseTestSetup;
+import org.apache.derbyTesting.junit.JDBC;
 import org.apache.derbyTesting.junit.SystemPropertyTestSetup;
 
 public class ij3Test extends ScriptTestCase {
@@ -41,7 +42,16 @@ public class ij3Test extends ScriptTestC
         props.setProperty("ij.database", "jdbc:derby:wombat;create=true");
         props.setProperty("ij.showNoConnectionsAtStart", "true");
         props.setProperty("ij.showNoCountForSelect", "true");
-        
+
+        // When running on JSR-169 platforms, we need to use a data source
+        // instead of a JDBC URL since DriverManager isn't available.
+        if (JDBC.vmSupportsJSR169()) {
+            props.setProperty("ij.dataSource",
+                              "org.apache.derby.jdbc.EmbeddedSimpleDataSource");
+            props.setProperty("ij.dataSource.databaseName", "wombat");
+            props.setProperty("ij.dataSource.createDatabase", "create");
+        }
+
         Test test = new SystemPropertyTestSetup(new ij3Test("ij3"), props);
         test = new CleanDatabaseTestSetup(test);   
         



Mime
View raw message