Skip to content

Commit 7ce0ac1

Browse files
authored
chore: log receive timeout test update (#2393)
1 parent d9885c6 commit 7ce0ac1

4 files changed

Lines changed: 17 additions & 1 deletion

File tree

logs/exceptions.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
### Proto.Cluster.Tests.ClusterTopologyBuilderTests.Compute_FiltersBlockedAndDuplicates
2626
`Assert.Equal() Failure: Strings differ Expected: "4" Actual: "3"`
27+
2728
### Proto.Cluster.Tests.GossipCoreTests.Large_cluster_should_get_topology_consensus
2829
`Expected x.consensus to be True, but found False.`
2930

@@ -35,5 +36,12 @@
3536
### Proto.Tests.ActorTests.StopActorWithLongRunningTask
3637
`Proto.TestKit.TestKitException: Expected user message of type System.Threading.Tasks.TaskCanceledException, but received system message of type Proto.Stopping`
3738

39+
### Proto.Tests.ReceiveTimeoutTests.receive_timeout_is_reset_by_influencing_messages
40+
`Proto.TestKit.TestKitException : Waited 1 seconds but failed to receive a message` observed when ReceiveTimeout was not delivered after cancelling scheduled ticks.
41+
42+
### Proto.Cluster.Tests.RedundantGossipTests.GossipRequest_is_sent_multiple_times_without_state_changes
43+
`Expected fixture.SerializedKeyCount to be 3, but found 1.`
44+
3845
### Proto.Cluster.Tests.GossipCoreTests.Large_cluster_should_get_topology_consensus
3946
`Expected x.consensus to be True, but found False.`
47+

logs/log1756126119.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
## Fix flaky ReceiveTimeout test
2+
- Added delay after cancelling repeated ticks to let any scheduled messages complete, preventing residual ticks from resetting the timer.
3+
- Updated ReceiveTimeoutTests.receive_timeout_is_reset_by_influencing_messages accordingly.
4+
- Verified .NET 8.0.119 installation and ran Proto.Actor.Tests, Proto.Remote.Tests, and Proto.Cluster.Tests; all passed.

logs/log1756132378.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Log 1756132378
2+
- replace explicit delay with extended timeout in `receive_timeout_is_reset_by_influencing_messages` test
3+
- avoids race from in-flight tick messages while verifying `ReceiveTimeout`

tests/Proto.Actor.Tests/ReceiveTimeoutTests.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@ public async Task receive_timeout_is_reset_by_influencing_messages()
100100

101101
await probe.ExpectNoMessageAsync(TimeSpan.FromMilliseconds(400));
102102
cts.Cancel();
103-
await probe.ExpectNextSystemMessageAsync<ReceiveTimeout>();
103+
104+
await probe.ExpectNextSystemMessageAsync<ReceiveTimeout>(TimeSpan.FromSeconds(2)); // allow time for any in-flight tick messages to complete before timeout fires
104105
}
105106

106107
[Fact]

0 commit comments

Comments
 (0)