Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-5322

Test Failure - test.test_streaming_protocol.TestStreamingProtocol.test_monitor_waits_after_server_check_error

    • Type: Icon: Build Failure Build Failure
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Python Drivers
    • 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?
    • None
    • None
    • None
    • None
    • None
    • None

      Name of Failure:

      test.test_streaming_protocol.TestStreamingProtocol.test_monitor_waits_after_server_check_error

      Link to task:

      https://spruce.mongodb.com/task/mongo_python_driver_test_macos_arm64_test_rapid_python3.11_sync_noauth_ssl_replica_set_patch_e6a4a7145eccb0b6c76c84aa539f29b40f3424b3_67fec6138250720007260f95_25_04_15_20_49_09?execution=0&sortBy=STATUS&sortDir=ASC

      Context of when and why the failure occurred:

      Stack trace:

       [2025/04/15 14:21:59.851] FAILURE: AssertionError: 3.6091692447662354 not less than or equal to 3.5 ()
       [2025/04/15 14:21:59.851] self = <test.test_streaming_protocol.TestStreamingProtocol testMethod=test_monitor_waits_after_server_check_error>
       [2025/04/15 14:21:59.851]     @client_context.require_failCommand_appName
       [2025/04/15 14:21:59.851]     def test_monitor_waits_after_server_check_error(self):
       [2025/04/15 14:21:59.851]         # This test implements:
       [2025/04/15 14:21:59.851]         # https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-discovery-and-monitoring-tests.md#monitors-sleep-at-least-minheartbeatfreqencyms-between-checks
       [2025/04/15 14:21:59.851]         fail_hello = {
       [2025/04/15 14:21:59.851]             "mode": {"times": 5},
       [2025/04/15 14:21:59.851]             "data": {
       [2025/04/15 14:21:59.851]                 "failCommands": [HelloCompat.LEGACY_CMD, "hello"],
       [2025/04/15 14:21:59.851]                 "errorCode": 1234,
       [2025/04/15 14:21:59.851]                 "appName": "SDAMMinHeartbeatFrequencyTest",
       [2025/04/15 14:21:59.851]             },
       [2025/04/15 14:21:59.851]         }
       [2025/04/15 14:21:59.851]         with self.fail_point(fail_hello):
       [2025/04/15 14:21:59.851]             start = time.time()
       [2025/04/15 14:21:59.851]             client = self.single_client(
       [2025/04/15 14:21:59.851]                 appName="SDAMMinHeartbeatFrequencyTest", serverSelectionTimeoutMS=5000
       [2025/04/15 14:21:59.851]             )
       [2025/04/15 14:21:59.851]             # Force a connection.
       [2025/04/15 14:21:59.851]             client.admin.command("ping")
       [2025/04/15 14:21:59.851]             duration = time.time() - start
       [2025/04/15 14:21:59.851]             # Explanation of the expected events:
       [2025/04/15 14:21:59.851]             # 0ms: run configureFailPoint
       [2025/04/15 14:21:59.851]             # 1ms: create MongoClient
       [2025/04/15 14:21:59.851]             # 2ms: failed monitor handshake, 1
       [2025/04/15 14:21:59.851]             # 502ms: failed monitor handshake, 2
       [2025/04/15 14:21:59.851]             # 1002ms: failed monitor handshake, 3
       [2025/04/15 14:21:59.851]             # 1502ms: failed monitor handshake, 4
       [2025/04/15 14:21:59.851]             # 2002ms: failed monitor handshake, 5
       [2025/04/15 14:21:59.851]             # 2502ms: monitor handshake succeeds
       [2025/04/15 14:21:59.851]             # 2503ms: run awaitable hello
       [2025/04/15 14:21:59.851]             # 2504ms: application handshake succeeds
       [2025/04/15 14:21:59.851]             # 2505ms: ping command succeeds
       [2025/04/15 14:21:59.851]             self.assertGreaterEqual(duration, 2)
       [2025/04/15 14:21:59.851] >           self.assertLessEqual(duration, 3.5)
       [2025/04/15 14:21:59.851] E           AssertionError: 3.6091692447662354 not less than or equal to 3.5
       [2025/04/15 14:21:59.851] test/test_streaming_protocol.py:175: AssertionError
      

            Assignee:
            noah.stapp@mongodb.com Noah Stapp
            Reporter:
            noah.stapp@mongodb.com Noah Stapp
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: