summaryrefslogtreecommitdiff
path: root/jstests/libs
diff options
context:
space:
mode:
authorCharlie Swanson <charlie.swanson@mongodb.com>2015-09-01 16:19:57 -0400
committerCharlie Swanson <charlie.swanson@mongodb.com>2015-09-09 13:14:48 -0400
commitc15f4bb96d2ee86874582d45d1865e9358168e7e (patch)
tree92c788863ae91a8b9c5801e1d536d7ef1a02ec05 /jstests/libs
parentf5e063d4785b0460ab41de8cc4b537e5e2151338 (diff)
downloadmongo-c15f4bb96d2ee86874582d45d1865e9358168e7e.tar.gz
SERVER-18272 Update jstests to use allocatePort() instead of hard coding ports
Diffstat (limited to 'jstests/libs')
-rw-r--r--jstests/libs/slow_weekly_util.js5
-rw-r--r--jstests/libs/ssl_test.js5
2 files changed, 3 insertions, 7 deletions
diff --git a/jstests/libs/slow_weekly_util.js b/jstests/libs/slow_weekly_util.js
index 18fc0874daa..69b8fb27624 100644
--- a/jstests/libs/slow_weekly_util.js
+++ b/jstests/libs/slow_weekly_util.js
@@ -1,11 +1,10 @@
SlowWeeklyMongod = function( name ) {
this.name = name;
- this.port = 30201;
-
this.start = new Date();
- this.conn = MongoRunner.runMongod({port: this.port, smallfiles: "", nojournal: ""});
+ this.conn = MongoRunner.runMongod({smallfiles: "", nojournal: ""});
+ this.port = this.conn.port;
};
SlowWeeklyMongod.prototype.getDB = function( name ) {
diff --git a/jstests/libs/ssl_test.js b/jstests/libs/ssl_test.js
index cfb899ab3d0..59380776bf8 100644
--- a/jstests/libs/ssl_test.js
+++ b/jstests/libs/ssl_test.js
@@ -36,14 +36,11 @@ function SSLTest(serverOpts, clientOpts) {
return canonical;
};
- this.port = allocatePorts(1)[0];
this.serverOpts = MongoRunner.mongodOptions(canonicalServerOpts(serverOpts));
+ this.port = this.serverOpts.port;
resetDbpath(this.serverOpts.dbpath);
this.clientOpts = Object.extend({}, clientOpts || this.defaultSSLClientOptions);
-
- // Add our allocated port to the options objects.
- this.serverOpts.port = this.port;
this.clientOpts.port = this.port;
}