[CSHARP-3184] Clarify System.Threading.Timer behavior in RequestHeartbeat_should_respect_to_minHeartbeatInterval Created: 14/Aug/20  Updated: 31/Mar/22

Status: Backlog
Project: C# Driver
Component/s: Testing
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Dmitry Lukyanov (Inactive) Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Research why the Timer triggers the event earlier than it's configured (Approximately not earlier than on 15ms).

To solve this behavior we were needed to adopt the test asserting on:

stopwatch.Elapsed.Should().BeGreaterOrEqualTo(minHeartbeatInterval - TimeSpan.FromMilliseconds(15));

instead of the original one:

stopwatch.Elapsed.Should().BeGreaterOrEqualTo(minHeartbeatInterval);


Generated at Wed Feb 07 21:44:37 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.