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):
166
166
167
167
# Disable background refresh.
168
168
with client_knobs (heartbeat_frequency = 999999 ):
169
- c = rs_client (socketTimeoutMS = 3000 , w = self .w )
169
+ c = rs_client (socketTimeoutMS = 1000 , w = self .w )
170
170
collection = c .pymongo_test .test
171
171
collection .insert_one ({})
172
172
173
173
# Query the primary.
174
174
self .assertRaises (
175
175
NetworkTimeout ,
176
176
collection .find_one ,
177
- {'$where' : delay (5 )})
177
+ {'$where' : delay (1. 5 )})
178
178
179
179
self .assertTrue (c .primary )
180
180
collection .find_one () # No error.
@@ -186,7 +186,7 @@ def test_timeout_does_not_mark_member_down(self):
186
186
self .assertRaises (
187
187
NetworkTimeout ,
188
188
coll .find_one ,
189
- {'$where' : delay (5 )})
189
+ {'$where' : delay (1. 5 )})
190
190
191
191
self .assertTrue (c .secondaries )
192
192
Original file line number Diff line number Diff line change @@ -121,7 +121,8 @@ def test_socket_error_marks_member_down(self):
121
121
members = ['a:1' , 'b:2' ],
122
122
mongoses = [],
123
123
host = 'a:1' ,
124
- replicaSet = 'rs' )
124
+ replicaSet = 'rs' ,
125
+ serverSelectionTimeoutMS = 100 )
125
126
self .addCleanup (c .close )
126
127
127
128
wait_until (lambda : len (c .nodes ) == 2 , 'discover both nodes' )
You can’t perform that action at this time.
0 commit comments