Files
mongo/jstests/disk/preallocate2.js
2010-05-24 17:33:01 -07:00

11 lines
371 B
JavaScript

// check that there is preallocation on insert
port = allocatePorts( 1 )[ 0 ];
var baseName = "jstests_preallocate2";
var m = startMongod( "--port", port, "--dbpath", "/data/db/" + baseName );
m.getDB( baseName )[ baseName ].save( {i:1} );
assert.soon( function() { return m.getDBs().totalSize > 100000000; }, "expected second file to bring total size over 100MB" );