You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix flaky pending-messages-modified E2E test across SDKs (#1362)
* Fix flaky pending-messages-modified E2E test across SDKs
The pending-messages-modified event-fidelity test was failing intermittently in
the C# SDK CI leg. The root cause was that this test was the only one in its
fixture not using the standard `SendAndWaitAsync` + event-collector pattern;
it went through a custom helper that did two independently-timed awaits and
used an `async void` local function for backfilling existing messages.
Refactor the test to the standard pattern in C#, Node, Python, and Go, and
while here, replace the `async void` (and its JS analog,`new Promise(async
(...) => ...)`) with proper `async Task` / `async` functions drained
deterministically. The C# helper now has zero `async void` methods.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Address review feedback: explicit catch and corrected comment
- TestHelper.cs: replace bare `catch { }` in the backfill-drain `finally`
with `catch (Exception) { /* intentionally ignored: already propagated
via tcs */ }` to make the swallow intent explicit and satisfy CodeQL.
- sdkTestHelper.ts: update the comment above `getFutureFinalResponse` to
reflect that the live subscription is installed before the existing-
messages RPC fires, matching the actual call ordering.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Bound backfill drain by timeout token
Thread cts.Token through CheckExistingMessagesAsync into
GetExistingMessagesAsync.session.GetEventsAsync so a hung backfill can't
delay (or prevent) the TimeoutException from surfacing through the
`finally` drain. Flagged by the Copilot PR reviewer.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
0 commit comments