db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kathey Marsden <kmarsdende...@sbcglobal.net>
Subject Re: how to deal with test failure in Chinese locale
Date Sat, 26 Mar 2011 16:56:25 GMT
On 3/26/2011 8:15 AM, Houx Zhang wrote:
> Hi, all. When I ran
> org.apache.derbyTesting.functionTests.tests.tools._Suite, I found 11
> failure. i.e. for SysinfoCPCheckTest, I've got error message below:
> D:\derby\test>java junit.textui.TestRunner
> org.apache.derbyTesting.functionTests
> .tests.tools.SysinfoCPCheckTest
> .F
> Time: 0.265
> There was 1 failure:
> 1)
> testClassPathChecker(org.apache.derbyTesting.functionTests.tests.tools.Sysinf
> oCPCheckTest)junit.framework.ComparisonFailure: null
> expected:<[Testing for pres
> ence of all Derby-related libraries; typically, only some are
> needed.]> but was:
> <[测试所有与 Derby 相关的库是否存在;通常只需要其中的某些库。]>
> at org.apache.derbyTesting.functionTests.tests.tools.SysinfoCPCheckTest.
> testClassPathChecker(SysinfoCPCheckTest.java:157)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:25)
> at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:
> 112)
> Tests run: 1, Failures: 1, Errors: 0
> I seems derby testing can not work well in Chinese Locale, maybe all
> other nonEnglish locales. Following the Derby wiki, I have tried to
> use "LocaleTestSetup' to decorate the test case in Locale.English and
> it pass successfully!
> As mentioned above, there are still some more testcases (maybe a lot
> of) can not work in nonEnglish locale. How to deal with this problem?
> A not so smart method is to decorate them individually in
> Locale.English, maybe a better method is to add a decoration into the
> root of the regression test or add a new system property to resolve it
> thoroughly.
As for a system property, try running with -Duser.language=en and see if
the test passes.
I thought as you suggest we had something in setup to force the right
language but obviously we do not. The only related issue I see on a
quick search of Jira is
https://issues.apache.org/jira/browse/DERBY-4260. Special handling may
be needed for spawned processes.

Making the Junit tests pass regardless of the user locale would be a
great part of a GSoC project.
Perhaps there is an issue for this, that I am just missing.


View raw message