Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-3184

Clarify System.Threading.Timer behavior in RequestHeartbeat_should_respect_to_minHeartbeatInterval

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Testing
    • Labels:
      None

      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);
      

            Assignee:
            Unassigned Unassigned
            Reporter:
            dmitry.lukyanov@mongodb.com Dmitry Lukyanov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: