Copilot commented on code in PR #574:
URL: https://github.com/apache/atlas/pull/574#discussion_r2972953952


##########
repository/src/test/java/org/apache/atlas/discovery/EntitySearchProcessorTest.java:
##########
@@ -67,6 +67,7 @@ public class EntitySearchProcessorTest extends BasicTestSetup 
{
 
     private static final SimpleDateFormat FORMATTED_DATE       = new 
SimpleDateFormat("dd-MMM-yyyy");
     private static final String           EXPECTED_ENTITY_NAME = 
"hive_Table_Null_tableType";
+    private static final TimeZone         TIME_ZONE_UTC        = 
TimeZone.getTimeZone("UTC");

Review Comment:
   TIME_ZONE_UTC is introduced and FORMATTED_DATE is set to UTC, but some 
date-range tests in this class still compute expected dates using 
default-timezone calendars (e.g., `new GregorianCalendar()` in `testLast7Days`, 
`testLast30Days`, `testYesterday`). Since `SearchProcessor.processDateRange()` 
uses UTC (`Clock.systemUTC()`), these tests can still be 
timezone-dependent/flaky on non-UTC hosts (especially near UTC day boundaries). 
Consider constructing those `GregorianCalendar` instances with `TIME_ZONE_UTC` 
(or switching them to `Calendar.getInstance(TIME_ZONE_UTC)`), so the expected 
values are calculated in UTC as well.



-- 
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