Description
The test ShardedDaemonProcessProxySpecs.ShardedDaemonProcessProxy_must_start_daemon_process_on_proxy is intermittently failing in CI due to a timing/race condition.
Failure Details
Test: Akka.Cluster.Hosting.Tests.ShardedDaemonProcessProxySpecs.ShardedDaemonProcessProxy_must_start_daemon_process_on_proxy
Location: src/Akka.Cluster.Hosting.Tests/ShardedDaemonProcessProxySpecs.cs:95
Error:
Assert.Equal() Failure: Values differ
Expected: 2
Actual: 1
Root Cause: The test expects 2 daemon processes to start but only 1 was started within the timeout period.
The logs show:
[WARNING][10/01/2025 18:44:58.304Z][Thread 0016][ActorSystem(ShardedDaemonProcessProxySpecs)] AwaitAssert failed, timeout [00:00:03] is over after [6] attempts and [00:00:03.2718737] elapsed time
Evidence
Suggested Fixes
- Increase timeout: The 3-second timeout may be insufficient in slower CI environments
- Add better diagnostics: Log the actual state when the assertion fails to understand what's happening
- Review cluster formation timing: Ensure both nodes in the cluster are fully joined and ready before expecting daemon processes to start
- Consider using TestKit probes: Use TestProbe to explicitly wait for specific cluster events before asserting on daemon process count
Impact
Related Code
The test is setting up a cluster with worker and proxy nodes, then expecting daemon processes to start on both. The timing between cluster formation and daemon process initialization appears to be the issue.
Description
The test
ShardedDaemonProcessProxySpecs.ShardedDaemonProcessProxy_must_start_daemon_process_on_proxyis intermittently failing in CI due to a timing/race condition.Failure Details
Test:
Akka.Cluster.Hosting.Tests.ShardedDaemonProcessProxySpecs.ShardedDaemonProcessProxy_must_start_daemon_process_on_proxyLocation:
src/Akka.Cluster.Hosting.Tests/ShardedDaemonProcessProxySpecs.cs:95Error:
Root Cause: The test expects 2 daemon processes to start but only 1 was started within the timeout period.
The logs show:
Evidence
AwaitAssertwith a 3-second timeoutSuggested Fixes
Impact
Related Code
The test is setting up a cluster with worker and proxy nodes, then expecting daemon processes to start on both. The timing between cluster formation and daemon process initialization appears to be the issue.