db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-6869) XMLXXETest fails in non-English locales
Date Tue, 09 Feb 2016 15:38:18 GMT

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

ASF subversion and git services commented on DERBY-6869:
--------------------------------------------------------

Commit 1729402 from [~knutanders] in branch 'code/trunk'
[ https://svn.apache.org/r1729402 ]

DERBY-6869: XMLXXETest fails in non-English locales

Decorate the test with a LocaleTestSetup that forces it to run in US
locale, so that it always sees English error messages.

Change the failing assert so that it reports the original exception in
case it doesn't get the expected exception. Makes it easier to debug
the test.

> XMLXXETest fails in non-English locales
> ---------------------------------------
>
>                 Key: DERBY-6869
>                 URL: https://issues.apache.org/jira/browse/DERBY-6869
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions: 10.13.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>         Attachments: d6869.diff
>
>
> I noticed that XMLXXETest failed on a machine with Swedish locale:
> {noformat}
> 1) testDerby6807BillionLaughsVTI(org.apache.derbyTesting.functionTests.tests.lang.XMLXXETest)junit.framework.AssertionFailedError
> 	at org.apache.derbyTesting.functionTests.tests.lang.XMLXXETest.testDerby6807BillionLaughsVTI(XMLXXETest.java:253)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:120)
> 	at org.apache.derbyTesting.junit.BaseJDBCTestCase.runBareOverridable(BaseJDBCTestCase.java:443)
> 	at org.apache.derbyTesting.junit.BaseJDBCTestCase.runBare(BaseJDBCTestCase.java:460)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
> 	at junit.extensions.TestSetup.run(TestSetup.java:25)
> 	at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:58)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
> 	at junit.extensions.TestSetup.run(TestSetup.java:25)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
> 	at junit.extensions.TestSetup.run(TestSetup.java:25)
> {noformat}
> derby.log shows that the following exception was raised:
> {noformat}
> ERROR 2200M: Invalid XML Document: JAXP00010001: Parsern har påträffat fler än "64000"
enhetstillägg i dokumentet - gränsvärdet för JDK har uppnåtts.
> {noformat}
> It is the expected exception, but the test searches for the substring "entity expansions"
in the error message. It doesn't find the substring since the error message has been translated
from English to Swedish.
> One way to fix it is to make the test case use assertStatementError() and check the SQLState
instead of the error message text.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message