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

« back to all changes in this revision

Viewing changes to jstests/disk/diskfull.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
doIt = false;
 
2
files = listFiles( "/data/db" );
 
3
for ( i in files ) {
 
4
    if ( files[ i ].name == "/data/db/diskfulltest" ) {
 
5
        doIt = true;
 
6
    }
 
7
}
 
8
 
 
9
if ( !doIt ) {
 
10
    print( "path /data/db/diskfulltest/ missing, skipping diskfull test" );
 
11
    doIt = false;
 
12
}
 
13
 
 
14
if ( doIt ) {
 
15
    port = allocatePorts( 1 )[ 0 ];
 
16
    m = startMongoProgram( "mongod", "--port", port, "--dbpath", "/data/db/diskfulltest", "--nohttpinterface", "--bind_ip", "127.0.0.1" );
 
17
    m.getDB( "diskfulltest" ).getCollection( "diskfulltest" ).save( { a: 6 } );
 
18
    assert.soon( function() { return rawMongoProgramOutput().match( /dbexit: really exiting now/ ); }, "didn't see 'really exiting now'" );
 
19
    assert( !rawMongoProgramOutput().match( /Got signal/ ), "saw 'Got signal', not expected.  Output: " + rawMongoProgramOutput() );
 
20
}