Skip to content

test: make retry observation waits terminal-aware - #641

Merged
SunSi12138 merged 1 commit into
devfrom
fix/387-retry-observation-terminal-aware
Sep 9, 2026
Merged

SunSi12138 merged 1 commit into
devfrom
fix/387-retry-observation-terminal-aware

Conversation

@SunSi12138

Copy link
Copy Markdown
Owner

Summary

Follow-up for the retry-liveness flake tracked in #387.

#637 already landed the root-cause isolation for SharpLinkClientRetryBehaviorTests.IdempotentUnaryShouldRetryRemoteUnavailableAndExposeResponseObservation by removing the unrelated one-second System request timeout from this response-observation/retry-policy test.

This PR closes the remaining diagnostic/liveness gap in the same test:

  • both expected Request emissions were previously awaited through unbounded WaitForSentPacket(Request) calls;
  • if the logical invocation becomes terminal before either expected Request can be emitted, the transport wait has no knowledge of that terminal state and can mask the real failure until the outer TUnit watchdog fires;
  • race each Request observation against the invocation itself;
  • if the invocation wins, await it immediately so the real exception is surfaced; if it completed successfully unexpectedly, fail with the exact emission phase.

The test still requires both the first Request and the retry Request to be emitted before injecting the successful second-attempt response. No retry, deadline, transport, or production behavior is weakened.

Validation

  • Static analysis and diff inspection only.
  • Branch is one commit ahead of dev and changes only test/SharpLink.UnitTests/Client/SharpLinkClientRetryBehaviorTests.cs.
  • No test/job/workflow reruns were manually triggered.

Refs #387
Follow-up to #637

@SunSi12138 SunSi12138 closed this Sep 9, 2026
@SunSi12138
SunSi12138 deleted the fix/387-retry-observation-terminal-aware branch September 9, 2026 15:42
@SunSi12138
SunSi12138 restored the fix/387-retry-observation-terminal-aware branch September 9, 2026 15:51
@SunSi12138 SunSi12138 reopened this Sep 9, 2026
@SunSi12138
SunSi12138 marked this pull request as ready for review September 9, 2026 15:55
@SunSi12138
SunSi12138 merged commit bc5f36c into dev Sep 9, 2026
26 checks passed
@SunSi12138
SunSi12138 deleted the fix/387-retry-observation-terminal-aware branch September 9, 2026 16:01
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.

1 participant