File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 2828from test .utils_shared import delay
2929
3030from pymongo .asynchronous .pool import AsyncConnection
31+ from pymongo .errors import ConnectionFailure
3132from pymongo .operations import _Op
3233from pymongo .server_selectors import writable_server_selector
3334
@@ -491,7 +492,7 @@ async def teardown():
491492 async def target ():
492493 try :
493494 await client .test .test .find_one ({"$where" : delay (0.1 )})
494- except OperationFailure :
495+ except ConnectionFailure :
495496 pass
496497
497498 # Warm the pool with 10 tasks so there are existing connections.
Original file line number Diff line number Diff line change 2727from test .utils import flaky
2828from test .utils_shared import delay
2929
30+ from pymongo .errors import ConnectionFailure
3031from pymongo .operations import _Op
3132from pymongo .server_selectors import writable_server_selector
3233from pymongo .synchronous .pool import Connection
@@ -485,7 +486,7 @@ def teardown():
485486 def target ():
486487 try :
487488 client .test .test .find_one ({"$where" : delay (0.1 )})
488- except OperationFailure :
489+ except ConnectionFailure :
489490 pass
490491
491492 # Warm the pool with 10 tasks so there are existing connections.
You can’t perform that action at this time.
0 commit comments