Skip to content

test(network): fix race in TestNotifier_VariousFlows/Happy_flow (backport of #4502) - #4504

Merged
reinkrul merged 1 commit into
V5.4from
V5_4/fix-flaky-notifier-happy-flow
Sep 9, 2026
Merged

test(network): fix race in TestNotifier_VariousFlows/Happy_flow (backport of #4502)#4504
reinkrul merged 1 commit into
V5.4from
V5_4/fix-flaky-notifier-happy-flow

Conversation

@stevenvegt

Copy link
Copy Markdown
Member

Backport of #4502 to V5.4, clean cherry-pick. Fixes the flaky TestNotifier_VariousFlows/Happy_flow: the subtest now waits for the persisted retry count instead of the in-memory callback counter, since notifyNow writes the retry count only after the callback returns.

The subtest waited until the receiver callback had run twice and then
read the persisted event, expecting two retries. notifyNow increments
and writes the retry count only after the callback returns, so on a
loaded runner the read could land between the second callback and its
write and observe one retry. Same race as fixed for TestNotifier_Notify
in #4274; observed on #4487.

The subtest now waits for the persisted retry count and checks that
the callback ran at least that often.

Assisted-by: AI
(cherry picked from commit 9fddb35)
@reinkrul
reinkrul merged commit 6352820 into V5.4 Sep 9, 2026
6 checks passed
@reinkrul
reinkrul deleted the V5_4/fix-flaky-notifier-happy-flow branch September 9, 2026 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants