ChinmayHegde24 opened a new pull request, #1173:
URL: https://github.com/apache/ranger/pull/1173

   **Description:**
   Timezone-dependent unit test failures found in MiscUtilTest (failure outside 
UTC)
   mainly in testGetFormattedTime and testGetUTCDateForLocalDate.
   
   **Fix**
   `testGetFormattedTime`: Replaced hardcoded "2021-01-01" with an expected 
value generated by the same SimpleDateFormat logic as production, so the test 
uses JVM local timezone and stays timezone-agnostic.
   
   `testGetUTCDateForLocalDate`: Fixed incorrect DST offset in 
MiscUtil.getUTCDateForLocalDate causing test failure outside UTC timezones
   
   **Test:** 
   Successful build
   Successful run with both 
   > mvn -pl agents-audit/core -Dtest=MiscUtilTest 
-Duser.timezone=America/New_York test  &
   > mvn -pl agents-audit/core -Dtest=MiscUtilTest -Duser.timezone=UTC test


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to