You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@orc.apache.org by "Kotaro Terada (JIRA)" <ji...@apache.org> on 2018/09/28 07:16:00 UTC
[jira] [Created] (ORC-410) Fix a locale-dependent test in
TestCsvReader
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.
{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)