Derby
  1. Derby
  2. DERBY-5798

Disable i18n/JapanCodeConversion.sql on platforms that don't support EUC_JP or SJIS

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 10.10.1.1
    • Fix Version/s: 10.10.1.1
    • Component/s: Test
    • Labels:
      None

      Description

      I ran derbyall on Java SE for Embedded 7, which doesn't support the EUC_JP or SJIS encodings. i18n/JapanCodeConversion.sql failed because of this:

                      • Diff file derbyall/i18nTest/JapanCodeConversion.diff
          • Start: JapanCodeConversion jdk1.7.0_04-ea derbyall:i18nTest 2012-05-31 15:10:02 ***
            55 del
            < 0 rows inserted/updated/deleted
            55a55,58
            > ERROR 38000: The exception 'java.sql.SQLException: The exception 'java.lang.reflect.InvocationTargetException' was thrown while evaluating an expression.' was thrown while evaluating an expression.
            > ERROR 38000: The exception 'java.lang.reflect.InvocationTargetException' was thrown while evaluating an expression.
            > ERROR XJ001: Java exception: ': java.lang.reflect.InvocationTargetException'.
            > ERROR XJ001: Java exception: 'java.io.UnsupportedEncodingException: EUC_JP'.
            59,74d61
            (...)

      We should skip the test on platforms that don't support these encodings.

      1. d5798-1a.diff
        40 kB
        Knut Anders Hatlen

        Activity

        Knut Anders Hatlen created issue -
        Hide
        Knut Anders Hatlen added a comment -

        I'll see if I can convert it to a JUnit test, as it's probably easier than adding the logic to the old framework.

        Show
        Knut Anders Hatlen added a comment - I'll see if I can convert it to a JUnit test, as it's probably easier than adding the logic to the old framework.
        Hide
        Knut Anders Hatlen added a comment -

        Attaching a patch that adds a new JUnit test, JapanCodeConversionTest, and removes the old JapanCodeConversion.sql test. The new test is skipped if it runs on a JVM that doesn't support EUC-JP and SJIS.

        I ran suites.All and derbyall successfully with the patch.

        Touched files:

        • tests/i18n/JapanCodeConversionTest.java

        Added new test class.

        • tests/i18n/_Suite.java

        Run the new test as part of the i18n suite.

        • master/JapanCodeConversion.out
        • tests/i18n/JapanCodeConversion.sql
        • tests/i18n/JapanCodeConversion_app.properties
        • tests/i18n/data/jap_EUC_JP.ctrl
        • tests/i18n/data/jap_SJIS.ctrl

        Removed since they are not used by the new test. (The latter two were not used by the original test either, as far as I could tell.)

        • suites/i18nTest.runall

        Stop running the old test.

        • tests/i18n/copyfiles.ant
        • tests/i18n/data/copyfiles.ant

        Removed references to removed files.

        Show
        Knut Anders Hatlen added a comment - Attaching a patch that adds a new JUnit test, JapanCodeConversionTest, and removes the old JapanCodeConversion.sql test. The new test is skipped if it runs on a JVM that doesn't support EUC-JP and SJIS. I ran suites.All and derbyall successfully with the patch. Touched files: tests/i18n/JapanCodeConversionTest.java Added new test class. tests/i18n/_Suite.java Run the new test as part of the i18n suite. master/JapanCodeConversion.out tests/i18n/JapanCodeConversion.sql tests/i18n/JapanCodeConversion_app.properties tests/i18n/data/jap_EUC_JP.ctrl tests/i18n/data/jap_SJIS.ctrl Removed since they are not used by the new test. (The latter two were not used by the original test either, as far as I could tell.) suites/i18nTest.runall Stop running the old test. tests/i18n/copyfiles.ant tests/i18n/data/copyfiles.ant Removed references to removed files.
        Knut Anders Hatlen made changes -
        Field Original Value New Value
        Attachment d5798-1a.diff [ 12531095 ]
        Hide
        Knut Anders Hatlen added a comment -

        Committed revision 1348064.

        Show
        Knut Anders Hatlen added a comment - Committed revision 1348064.
        Knut Anders Hatlen made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 10.10.0.0 [ 12321550 ]
        Resolution Fixed [ 1 ]
        Knut Anders Hatlen made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Gavin made changes -
        Workflow jira [ 12672096 ] Default workflow, editable Closed status [ 12797106 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        3d 57m 1 Knut Anders Hatlen 08/Jun/12 14:31
        Resolved Resolved Closed Closed
        46d 3h 59m 1 Knut Anders Hatlen 24/Jul/12 18:31

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development