File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -166,15 +166,15 @@ def test_timeout_does_not_mark_member_down(self):
166166
167167 # Disable background refresh.
168168 with client_knobs (heartbeat_frequency = 999999 ):
169- c = rs_client (socketTimeoutMS = 3000 , w = self .w )
169+ c = rs_client (socketTimeoutMS = 1000 , w = self .w )
170170 collection = c .pymongo_test .test
171171 collection .insert_one ({})
172172
173173 # Query the primary.
174174 self .assertRaises (
175175 NetworkTimeout ,
176176 collection .find_one ,
177- {'$where' : delay (5 )})
177+ {'$where' : delay (1. 5 )})
178178
179179 self .assertTrue (c .primary )
180180 collection .find_one () # No error.
@@ -186,7 +186,7 @@ def test_timeout_does_not_mark_member_down(self):
186186 self .assertRaises (
187187 NetworkTimeout ,
188188 coll .find_one ,
189- {'$where' : delay (5 )})
189+ {'$where' : delay (1. 5 )})
190190
191191 self .assertTrue (c .secondaries )
192192
Original file line number Diff line number Diff line change @@ -121,7 +121,8 @@ def test_socket_error_marks_member_down(self):
121121 members = ['a:1' , 'b:2' ],
122122 mongoses = [],
123123 host = 'a:1' ,
124- replicaSet = 'rs' )
124+ replicaSet = 'rs' ,
125+ serverSelectionTimeoutMS = 100 )
125126 self .addCleanup (c .close )
126127
127128 wait_until (lambda : len (c .nodes ) == 2 , 'discover both nodes' )
You can’t perform that action at this time.
0 commit comments