fix(test): widen AwaitAssertAsync budget for snapshot Asks - #1858
Merged
Conversation
Flapping_connection_grows_retry_backoff failed on Windows CI with Akka.Actor.AskTimeoutException: the 3s Ask inside AwaitAssertAsync had no headroom because AwaitAssertAsync defaults to a 3s budget (single-expect-default), not the fixture's default-timeout of 5s. On a loaded runner one slow Ask consumed the whole budget and the retry could not fit. Give the snapshot-Ask assertion loops an explicit 15s budget so the loop dominates the per-attempt Ask (>=4 full retries) while keeping the end-state assertions unchanged.
Aaronontheweb
enabled auto-merge (squash)
August 10, 2026 20:29
Aaronontheweb
disabled auto-merge
August 10, 2026 21:32
Aaronontheweb
added a commit
that referenced
this pull request
Aug 11, 2026
Two LlmSessionIntegrationTests flaked on Windows CI (run 31435126237) with real-time budget races — same family as the #1858 Discord fix, but fixed without touching any timeouts: Reminder_redelivery_is_deduped_while_first_turn_is_in_flight: The CommandAck fires BEFORE the first turn's LLM call is scheduled (recall resolution + working-context mailbox hop run first), so polling CallCount==1 raced the very thing it measured (got 0 under load). Added a FirstCallEntered TaskCompletionSource to FakeChatClient, set when the first GetResponseAsync entry increments CallCount (before the gate); the test now awaits the signal instead of polling. Event-driven, not wall-clock. JoinSession_receives_SessionJoined_acknowledgement: The first JoinSession cold-spawns the session actor through DI (fresh SQLite store, persistence recovery, serialization verification) inline in the parent mailbox — unbounded on a loaded runner, exceeding the 3s Ask. The test now warms the session with an unbounded-gated Tell + probe ExpectMsg first, so the assertion Ask measures only the hot path. The 30s ceilings are hang guards only, not pass/fail mechanisms.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Flapping_connection_grows_retry_backoffflakes on Windows CI with:Root cause is a budget inversion, not an actor bug. The snapshot
AskinsideAwaitAssertAsynchas a 3s timeout, andAwaitAssertAsyncwith nodurationdefaults toakka.test.single-expect-default= 3s — the fixture'sakka.test.default-timeout = 5sdoes not feed it. On a loaded runner one slow Ask consumed the whole assertion budget, so the retry could not fit and the loop rethrew theAskTimeoutException.Evidence (run 31417450377, Windows, sha 5f2f1c3):
Fix
Give the 7
AwaitAssertAsyncloops that embed the snapshotAskan explicit 15s budget (SnapshotAssertTimeout). 15s / (3s Ask + 100ms interval) guarantees ≥4 full retries; the loop still fails fast on a genuinely stuck actor. The 4 Ask-freeAwaitAssertAsynccalls (pure counter asserts) are left at the default.Verification
Flapping_connection_grows_retry_backoff: all green.