diff options
author | Richard Kreuter <richard@10gen.com> | 2010-08-18 10:52:20 -0400 |
---|---|---|
committer | Richard Kreuter <richard@10gen.com> | 2010-08-18 10:52:49 -0400 |
commit | ff4dd59c5d101e34fb6447835b70d5d334fcb372 (patch) | |
tree | b03e038f535e4fc11814b54434f46822f71c4b9e /buildscripts | |
parent | 5663169f5fd6f0f1dbff0911455540ba7ca25400 (diff) | |
download | mongo-ff4dd59c5d101e34fb6447835b70d5d334fcb372.tar.gz |
Change how smoke.py waits for replication for smallOplog tests.
Diffstat (limited to 'buildscripts')
-rwxr-xr-x | buildscripts/smoke.py | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/buildscripts/smoke.py b/buildscripts/smoke.py index 0023226bd3c..9f1f92b4e3b 100755 --- a/buildscripts/smoke.py +++ b/buildscripts/smoke.py @@ -212,15 +212,9 @@ def checkDbHashes(master, slave): print "waiting for slave to catch up..." ARB=10 # ARBITRARY time.sleep(ARB) - while True: - # FIXME: it's probably better to do an empty insert and a - # getLastError() to force a sync. - argv = [shellExecutable, "--port", str(slave.port), "--quiet", "--eval", 'db.printSlaveReplicationInfo()'] - res = Popen(argv, stdout=PIPE).communicate()[0] - m = re.search('(\d+)secs ', res) - if int(m.group(1)) > ARB: #res.find('initial sync') < 0: - break - time.sleep(3) + argv = [shellExecutable, "--port", str(slave.port), "--quiet", "--eval", 'db.getLastError(2, 30000)'] + res = Popen(argv, stdout=PIPE).wait() #.communicate()[0] + # FIXME: maybe assert that that res == 0? # FIXME: maybe make this run dbhash on all databases? for mongod in [master, slave]: |