diff options
author | Spencer T Brody <spencer@mongodb.com> | 2015-03-22 12:08:21 -0400 |
---|---|---|
committer | Spencer T Brody <spencer@mongodb.com> | 2015-04-06 18:19:21 -0400 |
commit | 6ccb82c987a47995fd7d8019d7fd4d1e557478b4 (patch) | |
tree | 2542816a69e9faaaff840754b42f0229dc905ccd /jstests/noPassthroughWithMongod/temp_namespace.js | |
parent | 7baac52f05a3e0cbdb7168e51836f507eda99dff (diff) | |
download | mongo-6ccb82c987a47995fd7d8019d7fd4d1e557478b4.tar.gz |
SERVER-17450 Standardize on a single way to start mongod in tests
Diffstat (limited to 'jstests/noPassthroughWithMongod/temp_namespace.js')
-rw-r--r-- | jstests/noPassthroughWithMongod/temp_namespace.js | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/jstests/noPassthroughWithMongod/temp_namespace.js b/jstests/noPassthroughWithMongod/temp_namespace.js index 123ad07270b..108c5871c7a 100644 --- a/jstests/noPassthroughWithMongod/temp_namespace.js +++ b/jstests/noPassthroughWithMongod/temp_namespace.js @@ -1,9 +1,8 @@ // this is to make sure that temp collections get cleaned up on restart testname = 'temp_namespace_sw' -path = MongoRunner.dataPath+testname -conn = startMongodEmpty("--port", 30000, "--dbpath", path, "--smallfiles", "--noprealloc", "--nopreallocj"); +var conn = MongoRunner.runMongod({smallfiles: "", noprealloc: "", nopreallocj: ""}); d = conn.getDB('test') d.runCommand({create: testname+'temp1', temp: true}); d[testname+'temp1'].ensureIndex({x:1}); @@ -21,10 +20,15 @@ function countCollectionNames( theDB, regex ) { assert.eq(countCollectionNames( d, /temp\d$/) , 2) assert.eq(countCollectionNames( d, /keep\d$/) , 4) -stopMongod(30000); +MongoRunner.stopMongod(conn); -conn = startMongodNoReset("--port", 30000, "--dbpath", path, "--smallfiles", "--noprealloc", "--nopreallocj"); +conn = MongoRunner.runMongod({restart:true, + cleanData: false, + dbpath: conn.dbpath, + smallfiles: "", + noprealloc: "", + nopreallocj: ""}); d = conn.getDB('test') assert.eq(countCollectionNames( d, /temp\d$/) , 0) assert.eq(countCollectionNames( d, /keep\d$/) , 4) -stopMongod(30000); +MongoRunner.stopMongod(conn); |