-
Type:
Build Failure
-
Resolution: Duplicate
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: greenerbuild
-
None
-
None
-
Python Drivers
-
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:
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
- duplicates
-
PYTHON-5322 Test Failure - test.test_streaming_protocol.TestStreamingProtocol.test_monitor_waits_after_server_check_error
-
- Closed
-