summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron <aaron@10gen.com>2010-01-19 17:20:34 -0800
committerAaron <aaron@10gen.com>2010-01-19 17:20:34 -0800
commit0cde1d796f820a2f359b34b718036e6919dc84cd (patch)
tree7679da154ef7d43626460540d28424f9e7434a28
parent15a31df5e98a1e2625f9327c8ca8f32161a6f097 (diff)
downloadmongo-0cde1d796f820a2f359b34b718036e6919dc84cd.tar.gz
MINOR don't reuse port from other test
-rw-r--r--jstests/disk/preallocate.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/jstests/disk/preallocate.js b/jstests/disk/preallocate.js
index 7ce3d40a412..69f9a474c73 100644
--- a/jstests/disk/preallocate.js
+++ b/jstests/disk/preallocate.js
@@ -1,18 +1,20 @@
+port = allocatePorts( 1 )[ 0 ]
+
var baseName = "jstests_preallocate";
vsize = function() {
return m.getDB( "admin" ).runCommand( "serverStatus" ).mem.virtual;
}
-var m = startMongod( "--port", "27018", "--dbpath", "/data/db/" + baseName );
+var m = startMongod( "--port", port, "--dbpath", "/data/db/" + baseName );
m.getDB( baseName ).createCollection( baseName + "1" );
vs = vsize();
-stopMongod( 27018 );
+stopMongod( port );
-var m = startMongoProgram( "mongod", "--port", "27018", "--dbpath", "/data/db/" + baseName );
+var m = startMongoProgram( "mongod", "--port", port, "--dbpath", "/data/db/" + baseName );
m.getDB( baseName ).createCollection( baseName + "2" );