This is an automated email from the ASF dual-hosted git repository.

abhishek pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/druid.git


The following commit(s) were added to refs/heads/master by this push:
     new 36e6765596 Fix flaky test (#13603)
36e6765596 is described below

commit 36e67655966815a79151bf94a4bb912362564946
Author: Kashif Faraz <[email protected]>
AuthorDate: Tue Jan 3 13:52:05 2023 +0530

    Fix flaky test (#13603)
---
 .../apache/druid/server/coordinator/duty/KillUnusedSegmentsTest.java   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/server/src/test/java/org/apache/druid/server/coordinator/duty/KillUnusedSegmentsTest.java
 
b/server/src/test/java/org/apache/druid/server/coordinator/duty/KillUnusedSegmentsTest.java
index ed7fea5aaf..3bd25f4c19 100644
--- 
a/server/src/test/java/org/apache/druid/server/coordinator/duty/KillUnusedSegmentsTest.java
+++ 
b/server/src/test/java/org/apache/druid/server/coordinator/duty/KillUnusedSegmentsTest.java
@@ -120,10 +120,11 @@ public class KillUnusedSegmentsTest
         )
     ).thenAnswer(invocation -> {
       DateTime maxEndTime = invocation.getArgument(1);
+      long maxEndMillis = maxEndTime.getMillis();
       List<Interval> unusedIntervals =
           unusedSegments.stream()
                         .map(DataSegment::getInterval)
-                        .filter(i -> i.getEnd().isBefore(maxEndTime))
+                        .filter(i -> i.getEnd().getMillis() <= maxEndMillis)
                         .collect(Collectors.toList());
 
       int limit = invocation.getArgument(2);


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to