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

Clarify System.Threading.Timer behavior in RequestHeartbeat_should_respect_to_minHeartbeatInterval

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Testing
    • None

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

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: