diff options
author | Jonathan Reams <jbreams@mongodb.com> | 2017-10-09 14:51:56 -0400 |
---|---|---|
committer | Jonathan Reams <jbreams@mongodb.com> | 2018-04-16 12:00:17 -0400 |
commit | a490d2d3a36c87b8736d07b940a3dbd2b51aa801 (patch) | |
tree | 3fd92a21c798a184a714cbeaa6822c9809168ffb | |
parent | 90ef0561dd788959e246321112942e78282fd87d (diff) | |
download | mongo-a490d2d3a36c87b8736d07b940a3dbd2b51aa801.tar.gz |
SERVER-31468 replSets/startParallelShell.js should wait for its parallel shells to exit
(cherry picked from commit 8c35aac5f109639d6b6d942db100acc0f709cd10)
-rw-r--r-- | jstests/replsets/startParallelShell.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/jstests/replsets/startParallelShell.js b/jstests/replsets/startParallelShell.js index beca88d19a9..b04e4abf2f3 100644 --- a/jstests/replsets/startParallelShell.js +++ b/jstests/replsets/startParallelShell.js @@ -18,16 +18,18 @@ var db; assert.eq(url, mongo.host, "replSet.getURL() should match active connection string"); print("* Starting parallel shell on --host " + db.getMongo().host); - startParallelShell('db.coll0.insert({test: "connString only"});'); + var awaitShell = startParallelShell('db.coll0.insert({test: "connString only"});'); assert.soon(function() { return db.coll0.find({test: "connString only"}).count() === 1; }); + awaitShell(); const uri = new MongoURI(url); const port0 = uri.servers[0].port; print("* Starting parallel shell w/ --port " + port0); - startParallelShell('db.coll0.insert({test: "explicit port"});', port0); + awaitShell = startParallelShell('db.coll0.insert({test: "explicit port"});', port0); assert.soon(function() { return db.coll0.find({test: "explicit port"}).count() === 1; }); + awaitShell(); })(); |