Derby
  1. Derby
  2. DERBY-4604

test lang.CollationTest.testSwedishCaseInsensitiveCollation fails with IBM's weme6.2/1.4.2. and Sun's 1.4.2

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 10.6.1.0
    • Fix Version/s: 10.6.1.0
    • Component/s: Test
    • Labels:
      None
    • Environment:
      IBM's weme 6.2 (j2ME/CDC/Foundation1.1 profile) / IBM 1.4.2.

      Description

      The test testSwedishCaseInsensitiveCollation failed with IBM's weme 6.2 (this was during a test run with patch for DERBY-4602) and during a legacy run with IBM 1.4.2.

      with weme6.2:
      1) testSwedishCaseInsensitiveCollation(org.apache.derbyTesting.functionTests.tests.lang.CollationTest)junit.framework.AssertionFailedError: Column value mismatch @ column 'ID', row 1:
      Expected: >6<
      Found: >4<
      at java.lang.Throwable.<init>(Throwable.java:67)
      at junit.framework.AssertionFailedError.<init>(AssertionFailedError.java:11)
      at org.apache.derbyTesting.junit.JDBC.assertRowInResultSet(JDBC.java:1129)
      at org.apache.derbyTesting.junit.JDBC.assertRowInResultSet(JDBC.java:1041)
      at org.apache.derbyTesting.junit.JDBC.assertFullResultSet(JDBC.java:929)
      at org.apache.derbyTesting.junit.JDBC.assertFullResultSet(JDBC.java:867)
      at org.apache.derbyTesting.junit.JDBC.assertFullResultSet(JDBC.java:825)
      at org.apache.derbyTesting.functionTests.tests.lang.CollationTest.checkLangBasedQuery(CollationTest.java:1324)
      at org.apache.derbyTesting.functionTests.tests.lang.CollationTest.testSwedishCaseInsensitiveCollation(CollationTest.java:561)
      at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:195)
      at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:109)
      at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
      at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
      at junit.extensions.TestSetup.run(TestSetup.java:23)
      at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
      at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
      at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
      at junit.extensions.TestSetup.run(TestSetup.java:23)
      at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
      at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
      at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
      at junit.extensions.TestSetup.run(TestSetup.java:23)

      And - do we still support 1.4.2 jvms - this also failed with IBMs 1.4.2:
      1) testSwedishCaseInsensitiveCollation(org.apache.derbyTesting.functionTests.tests.lang.CollationTest)junit.framework.AssertionFailedError: Column value mismatch @ column 'ID', row 1:
      Expected: >6<
      Found: >4<
      at org.apache.derbyTesting.junit.JDBC.assertRowInResultSet(JDBC.java(Compiled Code))
      at org.apache.derbyTesting.junit.JDBC.assertRowInResultSet(JDBC.java(Inlined Compiled Code))
      at org.apache.derbyTesting.junit.JDBC.assertFullResultSet(JDBC.java(Compiled Code))
      at org.apache.derbyTesting.junit.JDBC.assertFullResultSet(JDBC.java(Inlined Compiled Code))
      at org.apache.derbyTesting.junit.JDBC.assertFullResultSet(JDBC.java(Compiled Code))
      at org.apache.derbyTesting.functionTests.tests.lang.CollationTest.checkLangBasedQuery(CollationTest.java:1324)
      at org.apache.derbyTesting.functionTests.tests.lang.CollationTest.testSwedishCaseInsensitiveCollation(CollationTest.java:561)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java(Compiled Code))
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java(Compiled Code))
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
      at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:109)
      at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
      at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
      at junit.extensions.TestSetup.run(TestSetup.java:23)
      at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
      at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
      at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
      at junit.extensions.TestSetup.run(TestSetup.java:23)
      at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
      at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
      at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
      at junit.extensions.TestSetup.run(TestSetup.java:23)

      1. detect_bug.diff
        1 kB
        Knut Anders Hatlen

        Issue Links

          Activity

          Hide
          Myrna van Lunteren added a comment -

          The test passed again in the nightlies at IBM, both for ibm 1.4.2 and weme 6.2. Thanks Knut.

          Show
          Myrna van Lunteren added a comment - The test passed again in the nightlies at IBM, both for ibm 1.4.2 and weme 6.2. Thanks Knut.
          Hide
          Knut Anders Hatlen added a comment -

          The test now runs cleanly on both 1.4.2 and 1.6.0 in my environment. I've committed the fix to trunk with revision 930177.

          Show
          Knut Anders Hatlen added a comment - The test now runs cleanly on both 1.4.2 and 1.6.0 in my environment. I've committed the fix to trunk with revision 930177.
          Hide
          Knut Anders Hatlen added a comment -

          The attached patch disables the test case for buggy JVMs, but instead of disabling it based on the version/vendor of the JVM, it tests whether this specific bug is present. It does so by obtaining a Collator for the Swedish locale and comparing the strings "aa" and "ab". If "aa" is less than "ab", it is fine to run the test. Otherwise, the test is skipped.

          Show
          Knut Anders Hatlen added a comment - The attached patch disables the test case for buggy JVMs, but instead of disabling it based on the version/vendor of the JVM, it tests whether this specific bug is present. It does so by obtaining a Collator for the Swedish locale and comparing the strings "aa" and "ab". If "aa" is less than "ab", it is fine to run the test. Otherwise, the test is skipped.
          Hide
          Knut Anders Hatlen added a comment -

          This test case is already skipped on phoneME because the phoneME installation used in the nightlies only supports en_US locale.

          Show
          Knut Anders Hatlen added a comment - This test case is already skipped on phoneME because the phoneME installation used in the nightlies only supports en_US locale.
          Hide
          Myrna van Lunteren added a comment -

          I see the problem didn't occur with Sun/Oracle's PhoneME...(http://dbtg.foundry.sun.com/derby/test/Daily/javaME/testing/Limited/)

          I like the locale...

          I'd be ok with that one test not running with1.4.2.

          I'll pursue a fix from the weme team but am not sure how speedy such a thing can be obtained...Is it ok to switch it off with just weme6.2 (at least for now)?
          I think this would be the first test to do so. Or would it be ok to also switch it off for PhoneME as well (i.e. JSR169)?

          Show
          Myrna van Lunteren added a comment - I see the problem didn't occur with Sun/Oracle's PhoneME...( http://dbtg.foundry.sun.com/derby/test/Daily/javaME/testing/Limited/ ) I like the locale... I'd be ok with that one test not running with1.4.2. I'll pursue a fix from the weme team but am not sure how speedy such a thing can be obtained...Is it ok to switch it off with just weme6.2 (at least for now)? I think this would be the first test to do so. Or would it be ok to also switch it off for PhoneME as well (i.e. JSR169)?
          Hide
          Knut Anders Hatlen added a comment -

          Also seen in tests against Sun's 1.4.2 JVMs. I think it is caused by this bug (specific for Swedish locale in Java 1.3 and 1.4, fixed in 1.5): http://bugs.sun.com/view_bug.do?bug_id=4804273

          I guess we could either disable the test case in 1.4 JVMs, or we could switch to another locale.

          Show
          Knut Anders Hatlen added a comment - Also seen in tests against Sun's 1.4.2 JVMs. I think it is caused by this bug (specific for Swedish locale in Java 1.3 and 1.4, fixed in 1.5): http://bugs.sun.com/view_bug.do?bug_id=4804273 I guess we could either disable the test case in 1.4 JVMs, or we could switch to another locale.

            People

            • Assignee:
              Knut Anders Hatlen
              Reporter:
              Myrna van Lunteren
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development