You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "shivangi (Jira)" <ji...@apache.org> on 2024/09/30 05:35:00 UTC
[jira] [Updated] (HIVE-28538) Post JDK11: Fix locale-related discrepancies in test cases between local and Jenkins environments
[ https://issues.apache.org/jira/browse/HIVE-28538?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
shivangi updated HIVE-28538:
----------------------------
Summary: Post JDK11: Fix locale-related discrepancies in test cases between local and Jenkins environments (was: Post JDK11: Change in behaviour of Test cases in Local and Jenkins due to different Locale)
> Post JDK11: Fix locale-related discrepancies in test cases between local and Jenkins environments
> -------------------------------------------------------------------------------------------------
>
> Key: HIVE-28538
> URL: https://issues.apache.org/jira/browse/HIVE-28538
> Project: Hive
> Issue Type: Bug
> Security Level: Public(Viewable by anyone)
> Reporter: shivangi
> Assignee: shivangi
> Priority: Major
>
> *Issue:*
> Post JDK11, there are test failures occurring locally in the following test classes:
> # {{TestGenericUDFFromUnixTimeEvaluate}}
> # {{TestMiniLlapLocalCliDriver.udf_date_format.q}}
> *Error:*
> * *from_unixtime(1689930780, yyyy-MM-dd HH:mmaa) sessionZone=Etc/GMT, formatter=SIMPLE expected:<2023-07-21 09:13[AM]> but was:<2023-07-21 09:13[am]>*
> *Root Cause Analysis (RCA):*
> In JDK11, changes were made to the Java locale handling as documented in the following issues:
> * [JDK-8145136|https://bugs.openjdk.org/browse/JDK-8145136]
> * [JDK-8211985|https://bugs.openjdk.org/browse/JDK-8211985]
> These changes result in different locale behaviors. This issue does not occur in Jenkins because the test cases are written according to the {{en_US}} locale. However, when run locally, the locale may differ (e.g., {{{}en_IN{}}}), causing discrepancies. For instance, {{en_IN}} would expect {{am/pm}} while the tests expect {{{}AM/PM{}}}, leading to failures.
> *Solution:*
> To ensure consistent behavior across both local and Jenkins environments, pass the locale in {{<maven.test.jvm.args>}} to align both environments to {{en_US.}}
> This will ensure that all tests run with the {{en_US}} locale, mitigating locale-related test failures.
>
> *Additional Notes:*
> * There may be other test failures not yet captured due to different locales in local environments. Ensure all tests run with the {{en_US}} locale to identify and resolve any further issues.
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)