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


##########
repository/src/test/java/org/apache/atlas/discovery/EntitySearchProcessorTest.java:
##########
@@ -396,10 +396,11 @@ public void teardown() throws Exception {
 
     @Test
     public void testLast7Days() throws AtlasBaseException {
-        SearchParameters.FilterCriteria ret = 
filtercriteriaDateRange("LAST_7_DAYS", typeRegistry, graph);
+        SearchParameters.FilterCriteria ret       = 
filtercriteriaDateRange("LAST_7_DAYS", typeRegistry, graph);
+        Calendar                        startDate = 
Calendar.getInstance(TIME_ZONE_UTC);
+        Calendar                        endDate   = 
Calendar.getInstance(TIME_ZONE_UTC);
+
         ret.setAttributeName("createTime");

Review Comment:
   In `testLast7Days`, `ret.setAttributeName("createTime")` is called after 
`filtercriteriaDateRange()` has already returned the processed criteria. Since 
`processDateRange()` copies the attribute name from the input criteria, setting 
it on the returned object here doesn’t affect what’s being tested and is 
confusing. Consider removing this line, or set the attribute name on 
`filterCriteria` before calling `processDateRange()` in 
`filtercriteriaDateRange()`.
   ```suggestion
   
   ```



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