We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0f1c37f commit 8516080Copy full SHA for 8516080
test/replica/replset_tools.py
@@ -199,7 +199,11 @@ def stepdown_primary():
199
primary = get_primary()
200
if primary:
201
c = pymongo.Connection(primary)
202
- c.admin.command('replSetStepDown', 20)
+ # replSetStepDown causes mongod to close all connections
203
+ try:
204
+ c.admin.command('replSetStepDown', 20)
205
+ except:
206
+ pass
207
208
209
def restart_members(members):
test/replica/test_replica_set.py
@@ -160,7 +160,7 @@ def test_primary_failure(self):
160
secondaries = c.secondaries
161
162
def primary_changed():
163
- for _ in xrange(20):
+ for _ in xrange(30):
164
if c.primary != primary:
165
return True
166
time.sleep(1)
0 commit comments