diff options
author | Eric Milkie <milkie@10gen.com> | 2016-03-11 12:58:37 -0500 |
---|---|---|
committer | Eric Milkie <milkie@10gen.com> | 2016-03-11 16:56:29 -0500 |
commit | 3124f8f7457abd7223356f95974f3628a8ee922f (patch) | |
tree | 5176621becf8b4c740639b6ceed44fb5394c2fb0 /jstests | |
parent | af36940046e5cbdedfc287d8f9185d3ede1a6621 (diff) | |
download | mongo-3124f8f7457abd7223356f95974f3628a8ee922f.tar.gz |
SERVER-23089 ensure first sync is interrupted in repl5.js
Diffstat (limited to 'jstests')
-rw-r--r-- | jstests/repl/repl5.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/jstests/repl/repl5.js b/jstests/repl/repl5.js index 514d1560376..cb26c686b15 100644 --- a/jstests/repl/repl5.js +++ b/jstests/repl/repl5.js @@ -2,8 +2,12 @@ soonCountAtLeast = function(db, coll, count) { assert.soon(function() { + try { // print( "count: " + s.getDB( db )[ coll ].find().count() ); - return s.getDB(db)[coll].find().itcount() >= count; + return s.getDB(db)[coll].find().itcount() >= count; + } catch (e) { + return false; + } }); }; @@ -15,7 +19,7 @@ doTest = function(signal, extraOpts) { ma = m.getDB("a").a; var bulk = ma.initializeUnorderedBulkOp(); - for (i = 0; i < 10000; ++i) + for (i = 0; i < 100000; ++i) bulk.insert({i: i}); assert.writeOK(bulk.execute()); @@ -24,7 +28,6 @@ doTest = function(signal, extraOpts) { rt.stop(false, signal); s = rt.start(false, extraOpts, true); - sleep(1000); soonCountAtLeast("a", "a", 10000); rt.stop(); |