mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-30 04:06:34 +09:00
FakeWatcher.Modify synchronizes event receipt, not processing. A test
that cancels after sending the event can lose the retry-delay window
and observe more reads even when cancellation works correctly.
Cancel at the first failed live read and wait for its context to end
before returning the error, so the exact read count does not depend
on which goroutine runs next.
Fixes: 0ccb3fead7 ("fix(api): retry the live release read behind a monitor event")
Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>