|
26 | 26 |
|
27 | 27 | sys.path[0:0] = [""] |
28 | 28 |
|
29 | | -from test.asynchronous import AsyncIntegrationTest, AsyncPyMongoTestCase, AsyncUnitTest, unittest |
| 29 | +from test.asynchronous import ( |
| 30 | + AsyncIntegrationTest, |
| 31 | + AsyncPyMongoTestCase, |
| 32 | + AsyncUnitTest, |
| 33 | + async_client_context, |
| 34 | + unittest, |
| 35 | +) |
30 | 36 | from test.asynchronous.pymongo_mocks import DummyMonitor |
31 | 37 | from test.asynchronous.unified_format import generate_test_classes |
32 | | -from test.utils import ( |
| 38 | +from test.asynchronous.utils import ( |
| 39 | + async_get_pool, |
| 40 | +) |
| 41 | +from test.utils_shared import ( |
33 | 42 | CMAPListener, |
34 | 43 | HeartbeatEventListener, |
35 | 44 | HeartbeatEventsListListener, |
36 | 45 | assertion_context, |
37 | 46 | async_barrier_wait, |
38 | | - async_client_context, |
39 | 47 | async_create_barrier, |
40 | | - async_get_pool, |
41 | 48 | async_wait_until, |
42 | 49 | server_name_to_type, |
43 | 50 | ) |
44 | 51 | from unittest.mock import patch |
45 | 52 |
|
46 | 53 | from bson import Timestamp, json_util |
47 | | -from pymongo import AsyncMongoClient, common, monitoring |
| 54 | +from pymongo import common, monitoring |
48 | 55 | from pymongo.asynchronous.settings import TopologySettings |
49 | 56 | from pymongo.asynchronous.topology import Topology, _ErrorContext |
50 | 57 | from pymongo.errors import ( |
@@ -291,7 +298,7 @@ async def test_ignore_stale_connection_errors(self): |
291 | 298 | if not _IS_SYNC and sys.version_info < (3, 11): |
292 | 299 | self.skipTest("Test requires asyncio.Barrier (added in Python 3.11)") |
293 | 300 | N_TASKS = 5 |
294 | | - barrier = async_create_barrier(N_TASKS, timeout=30) |
| 301 | + barrier = async_create_barrier(N_TASKS) |
295 | 302 | client = await self.async_rs_or_single_client(minPoolSize=N_TASKS) |
296 | 303 |
|
297 | 304 | # Wait for initial discovery. |
|
0 commit comments