orc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kotaro Terada (JIRA)" <j...@apache.org>
Subject [jira] [Created] (ORC-410) Fix a locale-dependent test in TestCsvReader
Date Fri, 28 Sep 2018 07:16:00 GMT
Kotaro Terada created ORC-410:

             Summary: Fix a locale-dependent test in TestCsvReader
                 Key: ORC-410
                 URL: https://issues.apache.org/jira/browse/ORC-410
             Project: ORC
          Issue Type: Bug
            Reporter: Kotaro Terada

{{testCustomTimestampFormat}} in {{TestCsvReader}} fails in some environments because the
test is locale-dependent.

In this test, we try to parse a DateTime string (such as '21 Mar 2018 12:23:34') with a given
timestamp format. The problem is that English month abbreviations (such as 'Mar') are locale-dependent.
When the locale of Java Virtual Machine is a locale where the language is English (e.g., en_US
and en_GB), this test passes without any problems. However, when the locale of JVM is a locale
where the language is non-English (e.g., ja_JP and zh_CN), the test fails as follows.

[INFO] Running org.apache.orc.tools.convert.TestCsvReader
[ERROR] Tests run: 5, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.237 s <<<
FAILURE! - in org.apache.orc.tools.convert.TestCsvReader
[ERROR] testCustomTimestampFormat(org.apache.orc.tools.convert.TestCsvReader)  Time elapsed:
0.143 s  <<< ERROR!
org.threeten.bp.format.DateTimeParseException: Text '21 Mar 2018 12:23:34' could not be parsed
at index 3
        at org.apache.orc.tools.convert.TestCsvReader.testCustomTimestampFormat(TestCsvReader.java:189)

This message was sent by Atlassian JIRA

View raw message