Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-6869

XMLXXETest fails in non-English locales

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 10.13.1.0
    • 10.13.1.0
    • Test
    • None
    • Regression Test Failure

    Description

      I noticed that XMLXXETest failed on a machine with Swedish locale:

      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)
      

      derby.log shows that the following exception was raised:

      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.
      

      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.

      Attachments

        1. d6869.diff
          3 kB
          Knut Anders Hatlen

        Activity

          People

            knutanders Knut Anders Hatlen
            knutanders Knut Anders Hatlen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: