-
Type:
Build Failure
-
Resolution: Gone away
-
Priority:
Unknown
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
None
-
Python Drivers
-
None
-
None
-
None
-
None
-
None
-
None
Name of Failure:
test.asynchronous.test_concurrency.TestAsyncConcurrency.test_concurrency
Link to task:
Context of when and why the failure occurred:
Test is extremely dependent on host conditions.
Stack trace:
[2026/06/30 07:03:17.183] FAILURE: AssertionError: 34.673083208924446 not greater than or equal to 50 () [2026/06/30 07:03:17.183] self = <test.asynchronous.test_concurrency.TestAsyncConcurrency testMethod=test_concurrency> [2026/06/30 07:03:17.183] @unittest.skipIf( [2026/06/30 07:03:17.183] sys.platform == "darwin" and "CI" in os.environ, [2026/06/30 07:03:17.183] "PYTHON-5861: $where is too slow on macOS CI", [2026/06/30 07:03:17.183] ) [2026/06/30 07:03:17.183] async def test_concurrency(self): [2026/06/30 07:03:17.183] tasks = [] [2026/06/30 07:03:17.183] iterations = 5 [2026/06/30 07:03:17.183] [2026/06/30 07:03:17.183] client = await self.async_single_client() [2026/06/30 07:03:17.183] await client.db.test.drop() [2026/06/30 07:03:17.183] await client.db.test.insert_one({"x": 1}) [2026/06/30 07:03:17.183] [2026/06/30 07:03:17.183] start = time.time() [2026/06/30 07:03:17.183] [2026/06/30 07:03:17.183] for _ in range(iterations): [2026/06/30 07:03:17.183] await self._task(client) [2026/06/30 07:03:17.183] [2026/06/30 07:03:17.183] sequential_time = time.time() - start [2026/06/30 07:03:17.183] start = time.time() [2026/06/30 07:03:17.183] [2026/06/30 07:03:17.183] for i in range(iterations): [2026/06/30 07:03:17.183] tasks.append(self._task(client)) [2026/06/30 07:03:17.183] [2026/06/30 07:03:17.183] await asyncio.gather(*tasks) [2026/06/30 07:03:17.183] concurrent_time = time.time() - start [2026/06/30 07:03:17.183] [2026/06/30 07:03:17.183] percent_faster = (sequential_time - concurrent_time) / concurrent_time * 100 [2026/06/30 07:03:17.183] # We expect the concurrent tasks to be at least 50% faster on all platforms as a conservative benchmark [2026/06/30 07:03:17.183] > self.assertGreaterEqual(percent_faster, 50) [2026/06/30 07:03:17.183] E AssertionError: 34.673083208924446 not greater than or equal to 50 [2026/06/30 07:03:17.183] test/asynchronous/test_concurrency.py:63: AssertionError