diff options
author | Charlie Swanson <charlie.swanson@mongodb.com> | 2015-09-01 16:19:57 -0400 |
---|---|---|
committer | Charlie Swanson <charlie.swanson@mongodb.com> | 2015-09-09 13:14:48 -0400 |
commit | c15f4bb96d2ee86874582d45d1865e9358168e7e (patch) | |
tree | 92c788863ae91a8b9c5801e1d536d7ef1a02ec05 /jstests/disk/killall.js | |
parent | f5e063d4785b0460ab41de8cc4b537e5e2151338 (diff) | |
download | mongo-c15f4bb96d2ee86874582d45d1865e9358168e7e.tar.gz |
SERVER-18272 Update jstests to use allocatePort() instead of hard coding ports
Diffstat (limited to 'jstests/disk/killall.js')
-rw-r--r-- | jstests/disk/killall.js | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/jstests/disk/killall.js b/jstests/disk/killall.js index ba294a53504..beb3e99e778 100644 --- a/jstests/disk/killall.js +++ b/jstests/disk/killall.js @@ -6,19 +6,17 @@ * would not result in a zero return code. */ -var port = allocatePorts( 1 )[ 0 ] - var baseName = "jstests_disk_killall"; var dbpath = MongoRunner.dataPath + baseName; -var mongod = MongoRunner.runMongod({port: port, dbpath: dbpath}); +var mongod = MongoRunner.runMongod({dbpath: dbpath}); var db = mongod.getDB( "test" ); var collection = db.getCollection( baseName ); assert.writeOK(collection.insert({})); var awaitShell = startParallelShell( "db." + baseName + ".count( { $where: function() { while( 1 ) { ; } } } )", - port); + mongod.port); sleep( 1000 ); /** @@ -36,7 +34,7 @@ exitCode = awaitShell({checkExitSuccess: false}); assert.neq(0, exitCode, "expected shell to exit abnormally due to mongod being terminated"); mongod = MongoRunner.runMongod({ - port: port, + port: mongod.port, restart: true, cleanData: false, dbpath: mongod.dbpath |