diff options
Diffstat (limited to 'jstests/disk/repair4.js')
-rw-r--r-- | jstests/disk/repair4.js | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/jstests/disk/repair4.js b/jstests/disk/repair4.js index 944a4f6fd11..38049ee1f9b 100644 --- a/jstests/disk/repair4.js +++ b/jstests/disk/repair4.js @@ -18,14 +18,21 @@ if ( !doIt ) { } if ( doIt ) { + var repairpath = MongoRunner.dataPath + baseName + "/"; - port = allocatePorts( 1 )[ 0 ]; - repairpath = MongoRunner.dataPath + baseName + "/"; - resetDbpath( smallpath ); resetDbpath( repairpath ); - m = startMongoProgram( "mongod", "--nssize", "8", "--noprealloc", "--smallfiles", "--port", port, "--dbpath", smallpath, "--repairpath", repairpath, "--nohttpinterface", "--bind_ip", "127.0.0.1" ); + var m = MongoRunner.runMongod({ + nssize: "8", + noprealloc: "", + smallfiles: "", + dbpath: smallpath, + repairpath: repairpath, + nohttpinterface: "", + bind_ip: "127.0.0.1", + }); + db = m.getDB( baseName ); db[ baseName ].save( {} ); assert.commandWorked( db.runCommand( {repairDatabase:1, backupOriginalFiles:true} ) ); @@ -41,4 +48,4 @@ if ( doIt ) { check(); MongoRunner.stopMongod( port ); -}
\ No newline at end of file +} |