db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yun lee <yun.lee...@gmail.com>
Subject Re: What's wrong with test classes extending ScriptTestCase
Date Fri, 25 Jun 2010 08:18:00 GMT
Rick, "user.language" works here, thank you very much!

I will create a new issue to avoid the problem about locale just like
Kathey suggested.

Thanks again!



Best Wishes
Yun


2010/6/24 Rick Hillegas <rick.hillegas@oracle.com>:
> Hi Yun,
>
> I have never tried to run the tests with anything other than the default
> locale--on my machine in my part of the world that is US English. If I were
> going to try to run the tests with another locale, I would try one of the
> following experiments. Hopefully, you will get advice from someone who has
> successfully run the tests with a non-English locale:
>
> 1) I would try changing the default locale on the Java command line by
> setting the user.language and user.country variables. For details on how to
> do this, see http://java.sun.com/developer/technicalArticles/J2SE/locale/
>
> 2) If that doesn't work, I would try removing the message jars for the
> default localization from the classpath (maybe move them to a separate
> directory). If Derby can't find a localized version for a message, Derby
> should fall back on using US English.
>
> Hope this helps,
> -Rick
>
> yun lee wrote:
>>
>> Hi, Rick. Thanks for your advice! I agree with your judge related to
>> Chinese character set, as I have seen Chinese chars when testing. For
>> a pure junit test class, such as ToolScripts (a subclass of
>> ScriptTestCase), how to change the locale to be English?  Thanks!
>>
>> Best Wishes
>> Yun
>>
>>
>> 2010/6/22 Rick Hillegas <rick.hillegas@oracle.com>:
>>
>>>
>>> Hi Yun,
>>>
>>> That many ? characters in the UT_0RowsInserUpdatDelet message suggests to
>>> me
>>> that the tests are running with one of the Chinese locales. I think that
>>> the
>>> canon-based tests like LangScripts expect the locale to be English.
>>>
>>> Hope this helps,
>>> -Rick
>>>
>>> yun lee wrote:
>>>
>>>>
>>>> Hi, all. There's sth. wrong with  test classes extending
>>>> ScriptTestCase in my environment.
>>>>
>>>> For example, when running ToolScripts (a subclass of ScriptTestCase )
>>>> on DOS, all the tests failed like shown below. I have compared the
>>>> output with the .out file, and puzzled with so many messy code "?". Is
>>>> this caused by Character encoding? How to resolve this problem?
>>>>
>>>> Thanks a lot !
>>>>
>>>> Regards
>>>> Yun
>>>>
>>>>
>>>> D:\derby\test>java junit.textui.TestRunner
>>>> org.apache.derbyTesting.functionTests
>>>> .tests.tools.ToolScripts
>>>> .F.F.F.F.F.F.F.F.F
>>>> Time: 13.797
>>>> There were 9 failures:
>>>> 1)
>>>>
>>>> ij7(org.apache.derbyTesting.functionTests.tests.tools.ToolScripts)junit.frame
>>>> work.ComparisonFailure: Output at line 21 expected:<[0 rows
>>>> inserted/updated/del
>>>> eted]> but was:<[????????? 0 ?]>
>>>>       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
>>>> )
>>>> 2)
>>>>
>>>> showindex_embed(org.apache.derbyTesting.functionTests.tests.tools.ToolScripts
>>>> )junit.framework.ComparisonFailure: Output at line 26 expected:<[0 rows
>>>> inserted
>>>> /updated/deleted]> but was:<[????????? 0 ?]>
>>>>       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
>>>> )
>>>> 3)
>>>>
>>>> qualifiedIdentifiers(org.apache.derbyTesting.functionTests.tests.tools.ToolSc
>>>> ripts)junit.framework.ComparisonFailure: Output at line 20 expected:<[0
>>>> rows ins
>>>> erted/updated/deleted]> but was:<[????????? 0 ?]>
>>>>       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
>>>> )
>>>> 4)
>>>>
>>>> ij_show_roles_dbo(org.apache.derbyTesting.functionTests.tests.tools.ToolScrip
>>>> ts)junit.framework.ComparisonFailure: Output at line 10 expected:<[0
>>>> rows
>>>> insert
>>>> ed/updated/deleted]> but was:<[????????? 0 ?]>
>>>>       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)
>>>>       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)
>>>> 5)
>>>>
>>>> ij_show_roles_usr(org.apache.derbyTesting.functionTests.tests.tools.ToolScrip
>>>> ts)junit.framework.ComparisonFailure: Output at line 10 expected:<[0
>>>> rows
>>>> insert
>>>> ed/updated/deleted]> but was:<[????????? 0 ?]>
>>>>       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)
>>>>       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)
>>>> 6)
>>>>
>>>> ij7(org.apache.derbyTesting.functionTests.tests.tools.ToolScripts)junit.frame
>>>> work.ComparisonFailure: Output at line 21 expected:<[0 rows
>>>> inserted/updated/del
>>>> eted]> but was:<[????????? 0 ?]>
>>>>       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)
>>>> 7)
>>>>
>>>> ij_show_roles_dbo(org.apache.derbyTesting.functionTests.tests.tools.ToolScrip
>>>> ts)junit.framework.ComparisonFailure: Output at line 10 expected:<[0
>>>> rows
>>>> insert
>>>> ed/updated/deleted]> but was:<[????????? 0 ?]>
>>>>       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)
>>>>       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)
>>>>       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)
>>>> 8)
>>>>
>>>> ij_show_roles_usr(org.apache.derbyTesting.functionTests.tests.tools.ToolScrip
>>>> ts)junit.framework.ComparisonFailure: Output at line 10 expected:<[0
>>>> rows
>>>> insert
>>>> ed/updated/deleted]> but was:<[????????? 0 ?]>
>>>>       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)
>>>>       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)
>>>>       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)
>>>> 9)
>>>>
>>>> showindex_client(org.apache.derbyTesting.functionTests.tests.tools.ToolScript
>>>> s)junit.framework.ComparisonFailure: Output at line 26 expected:<[0 rows
>>>> inserte
>>>> d/updated/deleted]> but was:<[????????? 0 ?]>
>>>>       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)
>>>>
>>>> FAILURES!!!
>>>> Tests run: 9,  Failures: 9,  Errors: 0
>>>>
>>>>
>>>> D:\derby\test>
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>

Mime
View raw message