github-code-scanning[bot] commented on code in PR #14662:
URL: https://github.com/apache/druid/pull/14662#discussion_r1275516298
##########
server/src/test/java/org/apache/druid/server/coordinator/duty/KillUnusedSegmentsTest.java:
##########
@@ -169,9 +180,34 @@
yearOldSegment.getInterval().getStart(),
dayOldSegment.getInterval().getEnd()
);
+ mockAvailableTaskSlotsForKill(null);
+ runAndVerifyKillInterval(expectedKillInterval);
+ }
+
+ @Test
+ public void testAtLeastOneTaskCapacityEvenIfKillTaskRatio0()
+ {
+ // Only segments more than a day old are killed
+ Interval expectedKillInterval = new Interval(
+ yearOldSegment.getInterval().getStart(),
+ dayOldSegment.getInterval().getEnd()
+ );
+ mockAvailableTaskSlotsForKill(0.0);
runAndVerifyKillInterval(expectedKillInterval);
}
+ @Test
+ public void testNoAvailableTaskCapacityForKill()
+ {
+ // Only segments more than a day old are killed
+ Interval expectedKillInterval = new Interval(
+ yearOldSegment.getInterval().getStart(),
+ dayOldSegment.getInterval().getEnd()
+ );
Review Comment:
## Unread local variable
Variable 'Interval expectedKillInterval' is never read.
[Show more
details](https://github.com/apache/druid/security/code-scanning/5295)
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]