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

Clarify System.Threading.Timer behavior in RequestHeartbeat_should_respect_to_minHeartbeatInterval

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Testing
    • Labels:
      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

            Assignee:
            Unassigned
            Reporter:
            dmitry.lukyanov Dmitry Lukyanov
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: