Files
cozystack/pkg
Aleksei Sviridkin 689a81b681 test(api): cancel monitor live reads before retrying
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>
(cherry picked from commit 48d83b5f77)
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-11-25 10:49:44 +00:00
..