db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Hillegas (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-4359) Make UpgradeTrajectoryTest run on JVM 1.6
Date Fri, 11 Sep 2009 19:52:58 GMT

    [ https://issues.apache.org/jira/browse/DERBY-4359?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12754303#action_12754303
] 

Rick Hillegas commented on DERBY-4359:
--------------------------------------

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.

> Make UpgradeTrajectoryTest run on JVM 1.6
> -----------------------------------------
>
>                 Key: DERBY-4359
>                 URL: https://issues.apache.org/jira/browse/DERBY-4359
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Test
>    Affects Versions: 10.6.0.0
>         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)
>            Reporter: Ole Solberg
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message