Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 10.6.1.0
    • Fix Version/s: 10.6.1.0
    • Component/s: Test
    • Labels:
      None
    • Environment:
      JVM:
      Sun Microsystems Inc.
      java version "1.6.0_14"
      Java(TM) SE Runtime Environment (build 1.6.0_14-b08)
      Java HotSpot(TM) 64-Bit Server VM (build 14.0-b16 mixed mode 64-bit)

      Description

      When running the UpgradeTrajectoryTest on JVM 1.6 I see the following failures:

      10.0.2.1
      10.1.3.1
      10.2.2.1
      10.3.3.0
      10.4.2.0
      10.4.2.1
      10.5.1.1
      10.5.3.0
      DEBUG: Found 7 trajectories.
      .
      testTrajectory DEBUG: Testing trajectory: 10.0.2.1 -> 10.1.3.1 -> 10.2.2.1 -> 10.3.3.0 -> 10.4.2.0 -> 10.4.2.1 -> 10.5.1.1 -> 10.5.3.0 ( hard, hard, hard, hard, hard, hard, hard, hard )
      used 1900 ms F.
      testTrajectory DEBUG: Testing trajectory: 10.1.3.1 -> 10.2.2.1 -> 10.3.3.0 -> 10.4.2.0 -> 10.4.2.1 -> 10.5.1.1 -> 10.5.3.0 ( hard, hard, hard, hard, hard, hard, hard )
      used 570 ms F.
      testTrajectory DEBUG: Testing trajectory: 10.2.2.1 -> 10.3.3.0 -> 10.4.2.0 -> 10.4.2.1 -> 10.5.1.1 -> 10.5.3.0 ( hard, hard, hard, hard, hard, hard )
      used 9008 ms .

      1) testTrajectory(org.apache.derbyTesting.functionTests.tests.upgradeTests.UpgradeTrajectoryTest)junit.framework.ComparisonFailure: 10.0.2.1 -> 10.1.3.1 -> 10.2.2.1 -> 10.3.3.0 -> 10.4.2.0 -> 10.4.2.1 -> 10.5.1.1 -> 10.5.3.0 ( hard, hard, hard, hard, hard, hard, hard, hard ) expected:<10.[0.2.1]> but was:<10.[6.0.0]>
      at org.apache.derbyTesting.functionTests.tests.upgradeTests.UpgradeTrajectoryTest.vetDBVersion(UpgradeTrajectoryTest.java:904)
      at org.apache.derbyTesting.functionTests.tests.upgradeTests.UpgradeTrajectoryTest.createDatabase(UpgradeTrajectoryTest.java:800)
      at org.apache.derbyTesting.functionTests.tests.upgradeTests.UpgradeTrajectoryTest.testTrajectory(UpgradeTrajectoryTest.java:468)

      2) testTrajectory(org.apache.derbyTesting.functionTests.tests.upgradeTests.UpgradeTrajectoryTest)junit.framework.ComparisonFailure: 10.1.3.1 -> 10.2.2.1 -> 10.3.3.0 -> 10.4.2.0 -> 10.4.2.1 -> 10.5.1.1 -> 10.5.3.0 ( hard, hard, hard, hard, hard, hard, hard ) expected:<10.[1.3.1]> but was:<10.[6.0.0]>
      at org.apache.derbyTesting.functionTests.tests.upgradeTests.UpgradeTrajectoryTest.vetDBVersion(UpgradeTrajectoryTest.java:904)
      at org.apache.derbyTesting.functionTests.tests.upgradeTests.UpgradeTrajectoryTest.createDatabase(UpgradeTrajectoryTest.java:800)
      at org.apache.derbyTesting.functionTests.tests.upgradeTests.UpgradeTrajectoryTest.testTrajectory(UpgradeTrajectoryTest.java:468)

      Running with JVM 1.5 the test passes.

        Activity

        Hide
        Rick Hillegas added a comment -

        I can verify that the test fails for me on Java 6 as well. I believe this is the reason:

        1) The test uses JDBCDataSource to get a data source.

        2) On Java 6 JDBCDataSource tries to create an instance of Derby's JDBC4 data source.

        3) That data source does not exist in Derby versions before 10.2.2.0.

        4) The class loader looks for classes first in the jar files of the old Derby version which the test is trying to use. If the class loader doesn't find a class in those jar files, then the class loader defaults to look on the vm classpath.

        5) So for Derby versions before 10.2.2.0, on Java 6 the class loader falls through and returns a 10.6 version of Derby's JDBC4 data source.

        6) That then causes the test to create the database with the wrong version, viz. 10.6.

        The fix would be to use Derby's JDBC3 data source for Derby versions before 10.2.2.0.

        Show
        Rick Hillegas added a comment - I can verify that the test fails for me on Java 6 as well. I believe this is the reason: 1) The test uses JDBCDataSource to get a data source. 2) On Java 6 JDBCDataSource tries to create an instance of Derby's JDBC4 data source. 3) That data source does not exist in Derby versions before 10.2.2.0. 4) The class loader looks for classes first in the jar files of the old Derby version which the test is trying to use. If the class loader doesn't find a class in those jar files, then the class loader defaults to look on the vm classpath. 5) So for Derby versions before 10.2.2.0, on Java 6 the class loader falls through and returns a 10.6 version of Derby's JDBC4 data source. 6) That then causes the test to create the database with the wrong version, viz. 10.6. The fix would be to use Derby's JDBC3 data source for Derby versions before 10.2.2.0.
        Hide
        Rick Hillegas added a comment -

        Attaching derby-4359-01-aa-use30driver.diff. This patch makes the UpgradeTrajectoryTest use the embedded 30 driver if running on Java 6 while testing a trajectory which starts at a version before 10.2.2.0. With this patch, on Java 6, I can successfully test trajectories starting with releases which don't have JDBC4 drivers.

        Touches the following files:

        M java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/UpgradeTrajectoryTest.java

        Use the embedded 30 driver if running on Java 6 on a trajectory which starts before 10.2.2.0.

        M java/testing/org/apache/derbyTesting/junit/JDBCClient.java
        M java/testing/org/apache/derbyTesting/junit/JDBCClientSetup.java

        Make some decorator logic public so that it can be used by UpgradeTrajectoryTest.

        Show
        Rick Hillegas added a comment - Attaching derby-4359-01-aa-use30driver.diff. This patch makes the UpgradeTrajectoryTest use the embedded 30 driver if running on Java 6 while testing a trajectory which starts at a version before 10.2.2.0. With this patch, on Java 6, I can successfully test trajectories starting with releases which don't have JDBC4 drivers. Touches the following files: M java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/UpgradeTrajectoryTest.java Use the embedded 30 driver if running on Java 6 on a trajectory which starts before 10.2.2.0. M java/testing/org/apache/derbyTesting/junit/JDBCClient.java M java/testing/org/apache/derbyTesting/junit/JDBCClientSetup.java Make some decorator logic public so that it can be used by UpgradeTrajectoryTest.
        Hide
        Rick Hillegas added a comment -

        Tests passed cleanly for me.

        Show
        Rick Hillegas added a comment - Tests passed cleanly for me.
        Hide
        Rick Hillegas added a comment -

        Checked in fix at subversion revision 815303.

        Show
        Rick Hillegas added a comment - Checked in fix at subversion revision 815303.

          People

          • Assignee:
            Unassigned
            Reporter:
            Ole Solberg
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development