You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by my...@apache.org on 2011/08/09 02:06:40 UTC

svn commit: r1155163 - in /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests: master/ij5.out tests/tools/_Suite.java tests/tools/ij5.sql tests/tools/ij5Test.java

Author: myrnavl
Date: Tue Aug  9 00:06:40 2011
New Revision: 1155163

URL: http://svn.apache.org/viewvc?rev=1155163&view=rev
Log:
DERBY-5374; converted ij5Test fails with weme6.2 (CDC/Foundation): junit.framework.ComparisonFailure: Output at line 1 expected:<CONNECTION0* - jdbc:derby:wombat> but was:<ERROR XJ004: Database '' not found.>
  skipping the test with JSR169/CDC/Foundation.
  Also correcting a comment.

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/ij5.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/_Suite.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ij5.sql
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ij5Test.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/ij5.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/ij5.out?rev=1155163&r1=1155162&r2=1155163&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/ij5.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/ij5.out Tue Aug  9 00:06:40 2011
@@ -16,7 +16,7 @@ ij> --
 --   See the License for the specific language governing permissions and
 --   limitations under the License.
 --
--- assumes the connection connOne is set up already
+-- assumes the connection connection0 is set up already
 -- 1)at the startup time, it will list all the connections
 -- 2)select will now display number of rows selected
 

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/_Suite.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/_Suite.java?rev=1155163&r1=1155162&r2=1155163&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/_Suite.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/_Suite.java Tue Aug  9 00:06:40 2011
@@ -61,7 +61,6 @@ public class _Suite extends BaseTestCase
         suite.addTest(ConnectWrongSubprotocolTest.suite());
         
         suite.addTest(ij3Test.suite());
-        suite.addTest(ij5Test.suite());
         
         // SysinfoAPITest currently fails when run against jars, so is
         // disabled. Only the first jar file on the classpath properly
@@ -70,6 +69,12 @@ public class _Suite extends BaseTestCase
         //
         //suite.addTest(SysinfoAPITest.suite());
 
+        // tests that do not run with JSR169
+        if (JDBC.vmSupportsJDBC3())  
+        {
+            suite.addTest(ij5Test.suite());            
+        }
+        
         // Tests that are compiled using 1.4 target need to
         // be added this way, otherwise creating the suite
         // will throw an invalid class version error

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ij5.sql
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ij5.sql?rev=1155163&r1=1155162&r2=1155163&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ij5.sql (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ij5.sql Tue Aug  9 00:06:40 2011
@@ -14,7 +14,7 @@
 --   See the License for the specific language governing permissions and
 --   limitations under the License.
 --
--- assumes the connection connOne is set up already
+-- assumes the connection connection0 is set up already
 -- 1)at the startup time, it will list all the connections
 -- 2)select will now display number of rows selected
 

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ij5Test.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ij5Test.java?rev=1155163&r1=1155162&r2=1155163&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ij5Test.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ij5Test.java Tue Aug  9 00:06:40 2011
@@ -24,6 +24,7 @@ package org.apache.derbyTesting.function
 import java.util.Properties;
 
 import junit.framework.Test;
+import junit.framework.TestSuite;
 
 import org.apache.derbyTesting.functionTests.util.ScriptTestCase;
 import org.apache.derbyTesting.junit.CleanDatabaseTestSetup;
@@ -38,6 +39,14 @@ public class ij5Test extends ScriptTestC
     
     public static Test suite() {        
         Properties props = new Properties();
+
+        // With JSR169 environments, we would need to set ij.dataSource and
+        // provide the database name, but this would make an extra connection. 
+        // And as we're trying to test ij.showNoConnectionsAtStart=false, 
+        // we cannot get the same output with non-JSR-169 platforms. So,
+        // return an empty suite (i.e. don't run with JSR 169).
+        if (JDBC.vmSupportsJSR169())
+            return new TestSuite("empty: cannot obtain expected output with JSR169");
         
         props.setProperty("ij.showNoConnectionsAtStart", "false");
         props.setProperty("ij.showNoCountForSelect", "false");