Derby
  1. Derby
  2. DERBY-2434

HarnessJavaTest fails on UTF-8 locale.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 10.3.1.4
    • Fix Version/s: 10.3.1.4
    • Component/s: Test
    • Labels:
      None
    • Environment:
      Solaris Nevada - build 56, Sun JDK1.6

      Description

      The HarnessJavaTest fails to me all the time with the following error:
      statementJdbc20(org.apache.derbyTesting.functionTests.tests.jdbcapi.JDBCHarnessJavaTest)junit.framework.ComparisonFailure: Output at line 3 expected:<... parameter value '-1[,]000' for Statement.s...> but was:<... parameter value '-1[��]000' for Statement.s...>
      at org.apache.derbyTesting.functionTests.util.CanonTestCase.compareCanon(CanonTestCase.java:100)
      at org.apache.derbyTesting.functionTests.util.HarnessJavaTest.runTest(HarnessJavaTest.java:91)
      at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:76)
      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)
      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)

      There is only a difference in encoding a comma in statementJdbc20.out file on 3 lines.

      I have the following locale setup:
      LANG=en_US.UTF-8
      LC_CTYPE=sk_SK.UTF-8
      LC_NUMERIC="en_US.UTF-8"
      LC_TIME="en_US.UTF-8"
      LC_COLLATE="en_US.UTF-8"
      LC_MONETARY="en_US.UTF-8"
      LC_MESSAGES=en_US.UTF-8
      LC_ALL=

      I think It has something to do with my locale setup but I have not checked this yet.

      On my output, instead of comma, there are 2 bytes - C2 A0

        Issue Links

          Activity

          Gavin made changes -
          Workflow jira [ 12399202 ] Default workflow, editable Closed status [ 12799901 ]
          Kathey Marsden made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Daniel John Debrunner made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 10.3.0.0 [ 12310800 ]
          Hide
          Daniel John Debrunner added a comment -

          Committed revision 539249

          Show
          Daniel John Debrunner added a comment - Committed revision 539249
          Daniel John Debrunner made changes -
          Link This issue is duplicated by DERBY-2665 [ DERBY-2665 ]
          Daniel John Debrunner made changes -
          Assignee Daniel John Debrunner [ djd ]
          Daniel John Debrunner made changes -
          Field Original Value New Value
          Fix Version/s 10.3.0.0 [ 12310800 ]
          Hide
          Knut Anders Hatlen added a comment -

          I think this problem is also present in the tests that extend ScriptTestCase. For instance, when running the NistScripts test with LC_ALL set to de_DE.UTF-8 or de_DE.ISO8859-15 all of the 126 fixtures fail with messages like this:

          1) schema1(org.apache.derbyTesting.functionTests.tests.nist.NistScripts)junit.framework.ComparisonFailure: Output at line 16 expected:<0 [rows inserted/updated/deleted]> but was:<0 [Zeilen eingef?gt/aktualisiert/gel?scht]>

          The old harness sets the default locale to en_US and the default encoding to UTF-8 (I think) to prevent locale specific differences in the output.

          Show
          Knut Anders Hatlen added a comment - I think this problem is also present in the tests that extend ScriptTestCase. For instance, when running the NistScripts test with LC_ALL set to de_DE.UTF-8 or de_DE.ISO8859-15 all of the 126 fixtures fail with messages like this: 1) schema1(org.apache.derbyTesting.functionTests.tests.nist.NistScripts)junit.framework.ComparisonFailure: Output at line 16 expected:<0 [rows inserted/updated/deleted] > but was:<0 [Zeilen eingef?gt/aktualisiert/gel?scht] > The old harness sets the default locale to en_US and the default encoding to UTF-8 (I think) to prevent locale specific differences in the output.
          Julius Stroffek created issue -

            People

            • Assignee:
              Daniel John Debrunner
              Reporter:
              Julius Stroffek
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development