db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Hillegas (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-5217) make ImportExportIJTest pass in non-English locale
Date Fri, 10 Jun 2011 14:46:58 GMT

    [ https://issues.apache.org/jira/browse/DERBY-5217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13047225#comment-13047225
] 

Rick Hillegas commented on DERBY-5217:
--------------------------------------

Sorry to join the conversation so late. I'm confused about what the goal here is. The importExportIJ
test was converted to JUnit via the trick of just wrapping the old canon-based test in some
extra framework. At the end of the day, it is still a canon-based test rather than an assertion-based
test. It's just running under JUnit now. To make a canon-based test run in a non-English locale,
you have to supply a non-English canon alongside the English canon. Have we even built machinery
to support multiple, language-specific canons for our tests? Do we really want to supply 13
canons for this test, one for each of the localizations Derby provides?

It seems to me that a better way to "make ImportExportIJTest pass in non-English locale" is
to rewrite the test so that it is assertion-based, not canon-based, and to check for SQLStates
rather than message strings, as we do in our genuine assertion-based JUnit tests.

Sorry if I am off-base, but I am very confused about what is being attempted here. Thanks.

> make ImportExportIJTest pass in non-English locale
> --------------------------------------------------
>
>                 Key: DERBY-5217
>                 URL: https://issues.apache.org/jira/browse/DERBY-5217
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Test
>            Reporter: Houx Zhang
>            Assignee: Houx Zhang
>              Labels: gsoc2011
>         Attachments: DERBY-5217-LocaleTestSetup.patch, DERBY-5217-StandardException.patch,
DERBY-5217-SystemPropertyTestSetup.patch, DERBY-5217-log-LocalizedResource.patch, DERBY-5217-log-locale.patch,
DERBY-5217-log-setMessageLocale-DOS.txt, DERBY-5217-log-setMessageLocale-eclipse.txt, DERBY-5217-log-setMessageLocale.patch,
morePrints.txt, output-for-more-prints.txt, setDerbyUILocale.patch
>
>
> ImportExportIJTest fails in Chinese locale, just like below:
> D:\derby\test>java junit.textui.TestRunner org.apache.derbyTesting.functionTests
> .tests.tools.ImportExportIJTest
> .F
> Time: 7.937
> There was 1 failure:
> 1) importExportIJ(org.apache.derbyTesting.functionTests.tests.tools.ImportExport
> IJTest)junit.framework.ComparisonFailure: Output at line 22 expected:<ERROR 42Y5
> 5: ['DROP TABLE' cannot be performed on 'T1' because it does not exist.]> but wa
> s:<ERROR 42Y55: [?DROP TABLE?????T1????????????]>
>         at org.apache.derbyTesting.functionTests.util.CanonTestCase.compareCanon
> (CanonTestCase.java:109)
>         at org.apache.derbyTesting.functionTests.util.ScriptTestCase.runTest(Scr
> iptTestCase.java:201)
>         at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:
> 112)
>         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: 1,  Failures: 1,  Errors: 0

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message