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

Test Failure - test.asynchronous.test_streaming_protocol.TestStreamingProtocol.test_monitor_waits_after_server_check_error

    • Type: Icon: Build Failure Build Failure
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: greenerbuild
    • 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.asynchronous.test_streaming_protocol.TestStreamingProtocol.test_monitor_waits_after_server_check_error

      Link to task:

      https://spruce.mongodb.com/task/mongo_python_driver_test_macos_python3.9_test_4.4_sharded_cluster_auth_ssl_async_patch_bf0aa56fbbfa33c3bfbdf3c03a4ab55aceb0cda4_67f08a14880b50000896aa41_25_04_05_01_40_37/tests?execution=0&sortBy=STATUS&sortDir=ASC

      Context of when and why the failure occurred:

      Async tests often have higher latency due to the event loop overhead. Tests that have a defined range for timing should have that range expanded to allow for variable delays.

      Stack trace:

       [2025/04/04 19:26:23.239] FAILURE: AssertionError: 3.810739040374756 not less than or equal to 3.5 ()
       [2025/04/04 19:26:23.239] self = <test.asynchronous.test_streaming_protocol.TestStreamingProtocol testMethod=test_monitor_waits_after_server_check_error>
       [2025/04/04 19:26:23.239]     @async_client_context.require_failCommand_appName
       [2025/04/04 19:26:23.239]     async def test_monitor_waits_after_server_check_error(self):
       [2025/04/04 19:26:23.239]         # This test implements:
       [2025/04/04 19:26:23.239]         # 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/04 19:26:23.239]         fail_hello = {
       [2025/04/04 19:26:23.239]             "mode": {"times": 5},
       [2025/04/04 19:26:23.239]             "data": {
       [2025/04/04 19:26:23.239]                 "failCommands": [HelloCompat.LEGACY_CMD, "hello"],
       [2025/04/04 19:26:23.239]                 "errorCode": 1234,
       [2025/04/04 19:26:23.239]                 "appName": "SDAMMinHeartbeatFrequencyTest",
       [2025/04/04 19:26:23.239]             },
       [2025/04/04 19:26:23.239]         }
       [2025/04/04 19:26:23.239]         async with self.fail_point(fail_hello):
       [2025/04/04 19:26:23.239]             start = time.time()
       [2025/04/04 19:26:23.239]             client = await self.async_single_client(
       [2025/04/04 19:26:23.239]                 appName="SDAMMinHeartbeatFrequencyTest", serverSelectionTimeoutMS=5000
       [2025/04/04 19:26:23.239]             )
       [2025/04/04 19:26:23.239]             # Force a connection.
       [2025/04/04 19:26:23.239]             await client.admin.command("ping")
       [2025/04/04 19:26:23.239]             duration = time.time() - start
       [2025/04/04 19:26:23.239]             # Explanation of the expected events:
       [2025/04/04 19:26:23.239]             # 0ms: run configureFailPoint
       [2025/04/04 19:26:23.239]             # 1ms: create MongoClient
       [2025/04/04 19:26:23.239]             # 2ms: failed monitor handshake, 1
       [2025/04/04 19:26:23.239]             # 502ms: failed monitor handshake, 2
       [2025/04/04 19:26:23.239]             # 1002ms: failed monitor handshake, 3
       [2025/04/04 19:26:23.239]             # 1502ms: failed monitor handshake, 4
       [2025/04/04 19:26:23.239]             # 2002ms: failed monitor handshake, 5
       [2025/04/04 19:26:23.239]             # 2502ms: monitor handshake succeeds
       [2025/04/04 19:26:23.239]             # 2503ms: run awaitable hello
       [2025/04/04 19:26:23.239]             # 2504ms: application handshake succeeds
       [2025/04/04 19:26:23.239]             # 2505ms: ping command succeeds
       [2025/04/04 19:26:23.239]             self.assertGreaterEqual(duration, 2)
       [2025/04/04 19:26:23.239] >           self.assertLessEqual(duration, 3.5)
       [2025/04/04 19:26:23.239] E           AssertionError: 3.810739040374756 not less than or equal to 3.5
       [2025/04/04 19:26:23.239] test/asynchronous/test_streaming_protocol.py:175: AssertionError
      

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

              Created:
              Updated:
              Resolved: