Knut Anders Hatlen created DERBY-5958:
-----------------------------------------

             Summary: Many tests fail on JDK 8 because of missing collators
                 Key: DERBY-5958
                 URL: https://issues.apache.org/jira/browse/DERBY-5958
             Project: Derby
          Issue Type: Bug
          Components: Test
    Affects Versions: 10.10.0.0
            Reporter: Knut Anders Hatlen


Many of the regression tests fail on JDK 8 after 
http://bugs.sun.com/view_bug.do?bug_id=7171324 trimmed down the list of locales 
returned by Collator.getAvailableLocales(). Many test cases assume that certain 
locales are always available, even though the specification for 
Collator.getAvailableLocales() only guarantees that Locale.US is available. We 
should add guards to the collation-dependent test cases to prevent them from 
running when the required locale is not available in the test environment.

The most common source of the failures in my environment is the lack of 
collator support for the 'en' locale, with stack traces like this:

Caused by: ERROR XBM04: Collator support not available from the JVM for the 
database's locale 'en'.
        at org.apache.derby.iapi.error.StandardException.newException(Unknown 
Source)
        at 
org.apache.derby.iapi.types.DataValueFactoryImpl.verifyCollatorSupport(Unknown 
Source)
        at org.apache.derby.iapi.types.DataValueFactoryImpl.boot(Unknown Source)
        at org.apache.derby.iapi.types.J2SEDataValueFactory.boot(Unknown Source)
        at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown 
Source)
        at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown 
Source)
        at 
org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown Source)
        at 
org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unknown Source)
        at org.apache.derby.impl.db.BasicDatabase.boot(Unknown Source)
        at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown 
Source)
        at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown 
Source)
        at 
org.apache.derby.impl.services.monitor.BaseMonitor.bootService(Unknown Source)
        at 
org.apache.derby.impl.services.monitor.BaseMonitor.createPersistentService(Unknown
 Source)
        at 
org.apache.derby.iapi.services.monitor.Monitor.createPersistentService(Unknown 
Source)

Those should be easy enough to fix by making the tests use 'en_US' for 
territory, since support for that locale is required by the Java specification.

There are also other problems, like CollationTest2.suite(), which checks for 
the availability for the "no" locale, and if it is available, it runs the test 
with territory=no_NO. This does not work in an environment where the "no" 
locale is supported and the "no_NO" locale isn't. We should change the 
availability check and the actual database territory to match.

Another instance can be seen in tools/dblook_test_territory.java, which fails 
if a collator for the nl_NL locale isn't available. Since this test runs in the 
old test harness, which is less flexible when it comes to excluding tests based 
on the environment, it might be best to convert it to JUnit first.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to