shivangi created HIVE-28538:
-------------------------------
Summary: Post JDK11: Local Test Failures for
TestGenericUDFFromUnixTimeEvaluate and
TestMiniLlapLocalCliDriver.udf_date_format.q
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
*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)