[
https://issues.apache.org/jira/browse/DERBY-6881?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Knut Anders Hatlen closed DERBY-6881.
-------------------------------------
Resolution: Fixed
Assignee: Knut Anders Hatlen
Fix Version/s: 10.13.0.0
The remaining test failures were fixed in JDK 9-ea b113. Closing the issue.
> Test failures with JDK 9-ea b111
> --------------------------------
>
> Key: DERBY-6881
> URL: https://issues.apache.org/jira/browse/DERBY-6881
> Project: Derby
> Issue Type: Bug
> Components: Test
> Affects Versions: 10.13.0.0
> Reporter: Knut Anders Hatlen
> Assignee: Knut Anders Hatlen
> Fix For: 10.13.0.0
>
> Attachments: d6881-classloader.diff, d6881-sed.diff
>
>
> With JDK 9-ea b111 there are a number of test failures.
> Tests that use ClassLoaderTestSetup fail because the context class loader no
> longer is a URLClassLoader, which causes a ClassCastException in the class
> loader magic performed by the test setup:
> {noformat}
> java.lang.ClassCastException: jdk.internal.loader.ClassLoaders$AppClassLoader
> (in module: java.base) cannot be cast to java.net.URLClassLoader (in module:
> java.base)
> at
> org.apache.derbyTesting.junit.ClassLoaderTestSetup$1.run(ClassLoaderTestSetup.java:53)
> at
> org.apache.derbyTesting.junit.ClassLoaderTestSetup$1.run(ClassLoaderTestSetup.java:50)
> at java.security.AccessController.doPrivileged(java.base@9-ea/Native
> Method)
> at
> org.apache.derbyTesting.junit.ClassLoaderTestSetup.makeClassLoader(ClassLoaderTestSetup.java:49)
> at
> org.apache.derbyTesting.junit.ClassLoaderTestSetup.setUp(ClassLoaderTestSetup.java:64)
> at junit.extensions.TestSetup$1.protect(TestSetup.java:20)
> at junit.extensions.TestSetup.run(TestSetup.java:25)
> at
> org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:58)
> {noformat}
> CollationTest, CollationTest2, LocalizedAttributeScriptTest and
> LocalizedDisplayScriptTest have failures, for example:
> {noformat}
> junit.framework.AssertionFailedError: Column value mismatch @ column 'ID',
> row 1:
> Expected: >4<
> Found: >6<
> ID,NAME
> -- ----
> [6, aacorn]
> [4, Acorn]
> [2, Ącorn]
> [0, Smith]
> [5, Śmith]
> [1, Zebra]
> [3, Żebra]
> at
> org.apache.derbyTesting.junit.BaseTestCase.newAssertionFailedError(BaseTestCase.java:1177)
> at org.apache.derbyTesting.junit.JDBC.addRsToReport(JDBC.java:1998)
> at
> org.apache.derbyTesting.junit.JDBC.assertRowInResultSet(JDBC.java:1497)
> at
> org.apache.derbyTesting.junit.JDBC.assertRowInResultSet(JDBC.java:1395)
> at
> org.apache.derbyTesting.junit.JDBC.assertFullResultSetMinion(JDBC.java:1257)
> at
> org.apache.derbyTesting.junit.JDBC.assertFullResultSet(JDBC.java:1168)
> at
> org.apache.derbyTesting.junit.JDBC.assertFullResultSet(JDBC.java:1125)
> at
> org.apache.derbyTesting.junit.JDBC.assertFullResultSet(JDBC.java:1083)
> at
> org.apache.derbyTesting.functionTests.tests.lang.CollationTest.checkLangBasedQuery(CollationTest.java:2055)
> at
> org.apache.derbyTesting.functionTests.tests.lang.CollationTest.testNorwayCollation(CollationTest.java:482)
> at
> org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:120)
> at
> org.apache.derbyTesting.junit.BaseJDBCTestCase.runBareOverridable(BaseJDBCTestCase.java:443)
> at
> org.apache.derbyTesting.junit.BaseJDBCTestCase.runBare(BaseJDBCTestCase.java:460)
> at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
> at junit.extensions.TestSetup.run(TestSetup.java:25)
> at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
> at junit.extensions.TestSetup.run(TestSetup.java:25)
> at
> org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:58)
> at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
> at junit.extensions.TestSetup.run(TestSetup.java:25)
> Caused by: junit.framework.AssertionFailedError: Column value mismatch @
> column 'ID', row 1:
> Expected: >4<
> Found: >6<
> at
> org.apache.derbyTesting.junit.JDBC.assertRowInResultSet(JDBC.java:1492)
> {noformat}
> And the stack trace deletion patterns in the Sed class seem to be missing out
> on some stack frames now, causing failures like this one in dblook_test and
> dblook_test_territory:
> {noformat}
> ********* Diff file derbyall/derbytools/dblook_test.diff
> *** Start: dblook_test jdk9-ea derbyall:derbytools 2016-03-29 14:16:38 ***
> 6511a6512
> > at java.io.FileInputStream.open0(java.base@9-ea/Native Method)
> Test Failed.
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)