[ 
https://issues.apache.org/jira/browse/DERBY-4713?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Yun Lee updated DERBY-4713:
---------------------------

    Attachment: derby-4713-1.patch
                bit.out
                derby-4713-1.stat

Ask for help!

I have tried to do changing in ScriptTestSetup directly, just in the 
derby-4713-1.patch. However, it doesn't work as expected. Some  subclasses of 
ScriptTestSetupLangScripts, such as ImportExportIJTest, LangScripts, SURijTest 
and NistScripts (also a subclass of ScriptTestSetup) can not pass with a lot of 
'?' in the test result. I also attached bit.out (the output of bit test in 
LangScripts), in which you can see a lot of '?' in it.

I have spent a lot of time on debugging this problem, but could not resolve it. 
I have also tried to do changing in CanonTestCase, the situation was also bad.  
In my debugging, I'm sure , the default Locale has changed indeed and the 
runTest() method of ScriptTestCase was running in a US Locale. I have also 
tried to use some other Locale, such as "en_CN", but they all failed in the 
same situation.

I have to ask for help to resolve this problem. As to my patch attcahed last 
time, it can works well for every test. It seems in the patch attached this 
time, ij has still run in a Locale not as expected. 

Please give some advice, thanks very much!

> Subclasses of ScriptTestCase can not run correctly with the non-English 
> default locale
> --------------------------------------------------------------------------------------
>
>                 Key: DERBY-4713
>                 URL: https://issues.apache.org/jira/browse/DERBY-4713
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>            Reporter: Yun Lee
>            Assignee: Yun Lee
>         Attachments: bit.out, derby-4713-1.patch, derby-4713-1.stat, 
> derby-4713.patch, derby-4713.stat
>
>
> If the default locale is not English, many subclasses of ScriptTestCase will 
> fail. 
> For example, run NetIjTest (a subclass of ScriptTestcase)  in a Chinese OS, 
> the test case will fail:
> D:\derby\test>java junit.textui.TestRunner 
> org.apache.derbyTesting.functionTests
> .tests.derbynet.NetIjTest
> .F
> Time: 5.422
> There was 1 failure:
> 1) 
> testclientij(org.apache.derbyTesting.functionTests.tests.derbynet.NetIjTest)j
> unit.framework.ComparisonFailure: Output at line 34 expected:<[ERROR 42X05: 
> Tabl
> e/View 'APP.NOTTHERE' does not exist.]> but was:<[?? 
> 42X05??????APP.NOTTHERE????
> ?]>
>         at 
> org.apache.derbyTesting.functionTests.util.CanonTestCase.compareCanon
> (CanonTestCase.java:106)
>         at 
> org.apache.derbyTesting.functionTests.util.ScriptTestCase.runTest(Scr
> iptTestCase.java:198)
>         at 
> org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:
> 109)
>         at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
>         at junit.extensions.TestSetup$1.protect(TestSetup.java:23)
>         at junit.extensions.TestSetup.run(TestSetup.java:27)
>         at 
> org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57
> )
>         at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
>         at junit.extensions.TestSetup$1.protect(TestSetup.java:23)
>         at junit.extensions.TestSetup.run(TestSetup.java:27)
>         at 
> org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57
> )
>         at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
>         at junit.extensions.TestSetup$1.protect(TestSetup.java:23)
>         at junit.extensions.TestSetup.run(TestSetup.java:27)
>         at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
>         at junit.extensions.TestSetup$1.protect(TestSetup.java:23)
>         at junit.extensions.TestSetup.run(TestSetup.java:27)
> FAILURES!!!
> Tests run: 1, Failures: 1, Errors: 0 
> While, it succeed running with a English-language lcoale.
> D:\derby\test>java -Duser.language=en junit.textui.TestRunner 
> org.apache.derbyTe
> sting.functionTests.tests.derbynet.NetIjTest
> .
> Time: 6.187
> OK (1 test)

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

Reply via email to