summaryrefslogtreecommitdiff
path: root/jstests
diff options
context:
space:
mode:
authorEric Milkie <milkie@10gen.com>2016-03-11 12:58:37 -0500
committerEric Milkie <milkie@10gen.com>2016-03-11 16:56:29 -0500
commit3124f8f7457abd7223356f95974f3628a8ee922f (patch)
tree5176621becf8b4c740639b6ceed44fb5394c2fb0 /jstests
parentaf36940046e5cbdedfc287d8f9185d3ede1a6621 (diff)
downloadmongo-3124f8f7457abd7223356f95974f3628a8ee922f.tar.gz
SERVER-23089 ensure first sync is interrupted in repl5.js
Diffstat (limited to 'jstests')
-rw-r--r--jstests/repl/repl5.js9
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();