Skip to content

Fix flaky cold-association timeout in MultiTransportAddressingSpec - #8362

Merged
Aaronontheweb merged 1 commit into
akkadotnet:devfrom
Aaronontheweb:fix/multi-transport-spec-timeout
Jul 10, 2026
Merged

Aaronontheweb merged 1 commit into
akkadotnet:devfrom
Aaronontheweb:fix/multi-transport-spec-timeout

Conversation

@Aaronontheweb

Copy link
Copy Markdown
Member

Fixes the Windows CI flake seen on #8360's validation run: MultiTransportAddressingSpec.Should_Use_Second_Transport_For_Communication failing with ActorNotFoundException ... AskTimeoutException: Timeout after 1.00 seconds.

The spec's first ResolveOne per transport scheme races a cold association — endpoint actor spin-up, the AkkaProtocol handshake, and first-use JIT of the serialization pipeline — against a hard 1-second Ask timeout. ResolveOne is a plain ActorSelection API, so that value also never routes through akka.test.timefactor the way the TestKit Expect* methods do. On a loaded 2-core Windows agent the cold path can eat the whole second; the in-memory TestTransport rules out socket issues, and EndpointWriter buffers sends until the handshake completes, so nothing can be lost — the only failure mode is the timer itself.

One-line fix (plus a comment): resolve with Dilated(TimeSpan.FromSeconds(10)). Generous liveness bound, dilation restored, no retries or restructuring needed, all assertions unchanged. Passes 5/5 under taskset -c 0,1 (2-core emulation) locally.

…rtAddressingSpec

The spec's first ResolveOne per transport scheme raced a cold association (endpoint spin-up, AkkaProtocol handshake, first-use serialization JIT) against a hard 1-second Ask timeout that bypasses akka.test.timefactor, which intermittently times out on slow Windows CI agents. Nothing is lost while associating since EndpointWriter buffers sends until the handshake completes, so a single generous dilated wait removes the flake without retries or restructuring.
@Aaronontheweb
Aaronontheweb merged commit 13426de into akkadotnet:dev Jul 10, 2026
11 checks passed
@Aaronontheweb
Aaronontheweb deleted the fix/multi-transport-spec-timeout branch July 10, 2026 23:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant