You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@orc.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/10/01 15:52:00 UTC

[jira] [Commented] (ORC-410) Fix a locale-dependent test in TestCsvReader

    [ https://issues.apache.org/jira/browse/ORC-410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16634219#comment-16634219 ] 

ASF GitHub Bot commented on ORC-410:
------------------------------------

Github user asfgit closed the pull request at:

    https://github.com/apache/orc/pull/314


> 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
>            Priority: Major
>
> {{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.
> {noformat}
> [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)
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)