Repository navigation
test: avoid racing supervisor history read - #20458
Conversation
FrankChen021
left a comment
There was a problem hiding this comment.
🟢 Approval recommended
No actionable issues found in this one-file review. The removed read was timing-dependent under the 100 ms cleanup duty; the test still validates the initial history, waits for the cleanup metric to report both rows removed, and verifies that the history endpoint returns 404. Existing surrounding unit and resource tests cover NoopSupervisorSpec tombstone behavior and history serialization.
Reviewed 1 of 1 changed files.
Validation: Static inspection and git diff --check 0ad366d5d4a2bf3b1d35dd7f515c2302c5731e7e 500609b28df662ddf915c752b22229f3429f7448 -- embedded-tests/src/test/java/org/apache/druid/testing/embedded/server/KillSupervisorsCustomDutyTest.java passed. No builds or tests were run.
This is an automated review by Codex GPT-5.6-Luna(max)
Fixes #20445.
Description
This embedded test runs the
killSupervisorsduty every 100 ms with zero retention. After terminating a supervisor, it tried to read the two history entries before the duty deleted them. The reported CI failure was a 404 at that intermediate read.Remove the timing-dependent read. The test still verifies the initial supervisor history, waits for the cleanup metric to count both deleted entries, and checks that the history endpoint then returns 404. Tombstone behavior is covered by the separate supervisor and metadata tests.
Validation
KillSupervisorsCustomDutyTestclass passed in four Maven reactor runs with-Dsurefire.rerunFailingTestsCount=0: 4/4 runs passed.mvn -B checkstyle:check -pl embedded-tests -DskipTests=true -Dweb.console.skip=true: passed with 0 violations.git diff --check: passed.This changes only the embedded test; no production behavior or public API changes.
This PR has: