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

Fix flaky ServerMonitor test

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 2.25.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • Dotnet Drivers
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      RoundTripTimeMonitor_should_be_started_only_once_if_using_streaming_protocol test sometimes failing on the EG with following error message:

       [2024/02/28 15:43:52.269] FAILURE: Expected True, but found False. (failure)
       [2024/02/28 15:43:52.269] Expected True, but found False.
       [2024/02/28 15:43:52.269] Stack Trace:
       [2024/02/28 15:43:52.269]    at FluentAssertions.Execution.XUnit2TestFramework.Throw(String message)
       [2024/02/28 15:43:52.269]    at FluentAssertions.Execution.TestFrameworkProvider.Throw(String message)
       [2024/02/28 15:43:52.269]    at FluentAssertions.Execution.DefaultAssertionStrategy.HandleFailure(String message)
       [2024/02/28 15:43:52.269]    at FluentAssertions.Execution.AssertionScope.FailWith(String message, Object[] args)
       [2024/02/28 15:43:52.269]    at FluentAssertions.Primitives.BooleanAssertions.BeTrue(String because, Object[] becauseArgs)
       [2024/02/28 15:43:52.269]    at MongoDB.Driver.Core.Servers.ServerMonitorTests.RoundTripTimeMonitor_should_be_started_only_once_if_using_streaming_protocol() in C:\data\mci\6acf9a95180e493a7272b00fe4ebcb3a\mongo-csharp-driver\tests\MongoDB.Driver.Core.Tests\Core\Servers\ServerMonitorTests.cs:line 319
       [2024/02/28 15:43:52.269] Standard Output:
       [2024/02/28 15:43:52.269]     Formatted exception: Xunit.Sdk.XunitException: Expected True, but found False.
       [2024/02/28 15:43:52.269]     at FluentAssertions.Execution.XUnit2TestFramework.Throw(String message)
       [2024/02/28 15:43:52.269]     at FluentAssertions.Execution.TestFrameworkProvider.Throw(String message)
       [2024/02/28 15:43:52.269]     at FluentAssertions.Execution.DefaultAssertionStrategy.HandleFailure(String message)
       [2024/02/28 15:43:52.269]     at FluentAssertions.Execution.AssertionScope.FailWith(String message, Object[] args)
       [2024/02/28 15:43:52.269]     at FluentAssertions.Primitives.BooleanAssertions.BeTrue(String because, Object[] becauseArgs)
       [2024/02/28 15:43:52.269]     at MongoDB.Driver.Core.Servers.ServerMonitorTests.RoundTripTimeMonitor_should_be_started_only_once_if_using_streaming_protocol() in C:\data\mci\6acf9a95180e493a7272b00fe4ebcb3a\mongo-csharp-driver\tests\MongoDB.Driver.Core.Tests\Core\Servers\ServerMonitorTests.cs:line 319
       [2024/02/28 15:43:52.269]     11:34:20.3267688_Debug<MongoDB.Internal.IServerMonitor> 571 localhost 27017 Initializing
       [2024/02/28 15:43:52.269]     11:34:20.3269998_Debug<MongoDB.Internal.IServerMonitor> 571 localhost 27017 Initialized
       [2024/02/28 15:43:52.269]     11:34:20.3270442_Debug<MongoDB.SDAM> 571 759 localhost 27017 (null) Server heartbeat started False
       [2024/02/28 15:43:52.269]     11:34:20.3270803_Debug<MongoDB.SDAM> 571 759 localhost 27017 (null) Server heartbeat succeeded False 0 { "ok" : 1, "topologyVersion" : { "processId" : ObjectId("000000000000000000000000"), "counter" : NumberLong(0) }, "maxAwaitTimeMS" : 5000, "maxWireVersion" : 9 }
       [2024/02/28 15:43:52.269]     11:34:20.3271529_Debug<MongoDB.SDAM> 571 759 localhost 27017 (null) Server heartbeat started True
       [2024/02/28 15:43:52.269]     11:34:20.3272101_Debug<MongoDB.SDAM> 571 759 localhost 27017 (null) Server heartbeat succeeded True 0 { "ismaster" : true, "topologyVersion" : { "processId" : ObjectId("5ee3f0963109d4fe5e71dd28"), "counter" : NumberLong(0) }, "ok" : 1 }
       [2024/02/28 15:43:52.269]     11:34:20.3272385_Debug<MongoDB.SDAM> 571 759 localhost 27017 (null) Server heartbeat started True
       [2024/02/28 15:43:52.269]     11:34:20.3272759_Debug<MongoDB.SDAM> 571 759 localhost 27017 (null) Server heartbeat succeeded True 0 { "ismaster" : true, "topologyVersion" : { "processId" : ObjectId("5ee3f0963109d4fe5e71dd28"), "counter" : NumberLong(0) }, "ok" : 1 }
       [2024/02/28 15:43:52.269]     11:34:20.3272969_Debug<MongoDB.SDAM> 571 759 localhost 27017 (null) Server heartbeat started True
       [2024/02/28 15:43:52.269]     11:34:20.327332_Debug<MongoDB.SDAM> 571 759 localhost 27017 (null) Server heartbeat succeeded True 0 { "ismaster" : true, "topologyVersion" : { "processId" : ObjectId("5ee3f0963109d4fe5e71dd28"), "counter" : NumberLong(0) }, "ok" : 1 }
       [2024/02/28 15:43:52.269]     11:34:20.327354_Debug<MongoDB.SDAM> 571 759 localhost 27017 (null) Server heartbeat started True
       [2024/02/28 15:43:52.269]     11:34:20.3277634_Debug<MongoDB.SDAM> 571 759 localhost 27017 (null) Server heartbeat failed True 0 System.InvalidOperationException: Queue empty. 

            Assignee:
            oleksandr.poliakov@mongodb.com Oleksandr Poliakov
            Reporter:
            oleksandr.poliakov@mongodb.com Oleksandr Poliakov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: