File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 62
62
writable_server_selector )
63
63
from pymongo .server_type import SERVER_TYPE
64
64
from pymongo .settings import TOPOLOGY_TYPE
65
+ from pymongo .topology import _ErrorContext
65
66
from pymongo .srv_resolver import _HAVE_DNSPYTHON
66
67
from pymongo .write_concern import WriteConcern
67
68
from test import (client_context ,
@@ -1543,10 +1544,9 @@ def stop(self):
1543
1544
1544
1545
def run (self ):
1545
1546
while self .running :
1546
- self .pool .reset ()
1547
- # TODO: This may be racey: replace with
1548
- # topology.handle_error()?
1549
- self .pool .ready ()
1547
+ exc = AutoReconnect ('mock pool error' )
1548
+ ctx = _ErrorContext (exc , 0 , pool .generation , False )
1549
+ client ._topology .handle_error (pool .address , ctx )
1550
1550
time .sleep (0.001 )
1551
1551
1552
1552
t = ResetPoolThread (pool )
You can’t perform that action at this time.
0 commit comments