~ubuntu-branches/ubuntu/trusty/mongodb/trusty-proposed

« back to all changes in this revision

Viewing changes to jstests/disk/preallocate.js

  • Committer: Bazaar Package Importer
  • Author(s): Antonin Kral
  • Date: 2010-01-29 19:48:45 UTC
  • Revision ID: james.westby@ubuntu.com-20100129194845-8wbmkf626fwcavc9
Tags: upstream-1.3.1
ImportĀ upstreamĀ versionĀ 1.3.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
port = allocatePorts( 1 )[ 0 ]
 
2
 
 
3
var baseName = "jstests_preallocate";
 
4
 
 
5
vsize = function() {
 
6
    return m.getDB( "admin" ).runCommand( "serverStatus" ).mem.virtual;
 
7
}
 
8
 
 
9
var m = startMongod( "--port", port, "--dbpath", "/data/db/" + baseName );
 
10
 
 
11
m.getDB( baseName ).createCollection( baseName + "1" );
 
12
 
 
13
vs = vsize();
 
14
 
 
15
stopMongod( port );
 
16
 
 
17
var m = startMongoProgram( "mongod", "--port", port, "--dbpath", "/data/db/" + baseName );
 
18
 
 
19
m.getDB( baseName ).createCollection( baseName + "2" );
 
20
 
 
21
assert.eq( vs, vsize() );