Permalink
Browse files

Master-slave test fix

  • Loading branch information...
ajdavis committed Apr 19, 2012
1 parent 3d74205 commit 3abf8756e712e0b96acd0c60cbe4b3c785ef1802
Showing with 6 additions and 3 deletions.
  1. +6 −3 test/test_master_slave_connection.py
@@ -281,13 +281,16 @@ def test_kill_cursor_explicit(self):
[{"i": i} for i in range(20)], w=1 + len(self.slaves))
st = time.time()
- while time.time() - st < 30:
+ while time.time() - st < 120:
# Wait for replication -- the 'w' parameter should obviate this
# loop but it's not working in Jenkins right now
- if len(list(test.find())) == 20:
+ if list(test.find({"i": 19})):
break
+ time.sleep(0.5)
else:
- self.fail("Replication timeout")
+ self.fail("Replication timeout, test coll has %s records" % (
+ len(list(test.find()))
+ ))
# Partially evaluate cursor so it's left alive, then kill it
cursor = test.find().batch_size(10)

0 comments on commit 3abf875

Please sign in to comment.