Repository navigation
De-flake Cluster.Hosting tests: stop hosts that fail to start, 60 s to join - #8620
Merged
Aaronontheweb merged 1 commit intoSep 24, 2026
Conversation
… s for it to join ClusterSingletonSpecs.SeparateProxyWithManagerNameTest failed on a 2-vCPU Windows agent with TaskCanceledException from CreateHost: the second (proxy) host needed ~29 s from start to MemberUp against a 30 s budget, on a machine whose heartbeats were already 6-7 s late. Nothing was lost - every join hop just took 5-12 s. - The cluster-formation wait goes from 30 s to 60 s. - When CreateHost throws after StartAsync, the caller never receives the host, so it was never stopped: its ActorSystem kept gossiping and heartbeating through the rest of the assembly. CreateHost now stops (10 s, best effort, logged) and disposes it before rethrowing.
Aaronontheweb
deleted the
fix/cluster-hosting-createhost-join-timeout
branch
September 24, 2026 13:19
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.
Akka.Cluster.Hosting.Tests.ClusterSingletonSpecs.SeparateProxyWithManagerNameTest("WithSingletonProxy should work with manager name") failed on a 2-vCPU Windows agent with aTaskCanceledExceptionfromTestHelper.CreateHost(seen in an AOT-stack #8613 build, which doesn't touch hosting).Cause
CreateHostwaited 30 s forMemberUp. The second (proxy) host needed about 29 s after startup to be let into the cluster, and its ownMemberUpcame after that.retry-unsuccessful-join-after(10 s) restarting the join, which dead-lettered the first Welcome (about 2.5 s).A leak found along the way
When
CreateHostthrew afterStartAsync, the caller never got the host, so nothing ever stopped it. ItsActorSystemkept gossiping and heartbeating through every later test in the assembly.Change (
TestHelper.CreateHostonly)CreateHostis a static helper outside the TestKit, so there's no timefactor to scale it with.CreateHoststops it (best effort, 10 s, logged to the test output) and disposes it before rethrowing.This covers every test that uses
CreateHost: all ofClusterSingletonSpecsandClusterShardingSpecs.Verification (local)
ClusterSingletonSpecsandClusterShardingSpecspass, 9/9.