summaryrefslogtreecommitdiff
path: root/jstests/disk/preallocate2.js
blob: ee9382cfe8d0d5ecf7aa61c69dbaf28a6259fb74 (plain)
1
2
3
4
5
6
7
8
9
10
11
// 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" );