summaryrefslogtreecommitdiff
path: root/jstests/disk
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2012-12-18 11:10:02 -0500
committerEliot Horowitz <eliot@10gen.com>2012-12-18 11:10:02 -0500
commit85355c52122be895d4ae1bc966ec0d3339cf39d7 (patch)
treec54d62e9fc38c681bba48be88ba2b8372333ac80 /jstests/disk
parent6889d1658136c753998b4a408dc8d1a3ec28e3b9 (diff)
downloadmongo-85355c52122be895d4ae1bc966ec0d3339cf39d7.tar.gz
SERVER-7451 - fix disk full test error checking
Diffstat (limited to 'jstests/disk')
-rw-r--r--jstests/disk/diskfull.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/jstests/disk/diskfull.js b/jstests/disk/diskfull.js
index de37db8e1ec..7dd34c09484 100644
--- a/jstests/disk/diskfull.js
+++ b/jstests/disk/diskfull.js
@@ -23,9 +23,13 @@ if ( doIt ) {
d = m.getDB( "diskfulltest" );
c = d.getCollection( "diskfulltest" );
c.save( { a: 6 } );
- assert.eq(d.getLastError(), "new file allocation failure"); // first fail
- assert.soon( function() { return rawMongoProgramOutput().match( /file allocation failure/ ); }, "didn't see 'file allocation failure'" );
- assert.isnull( c.findOne() , "shouldn't exist" );
+ assert(d.getLastError().length );
+ printjson( d.getLastErrorObj() );
+ assert.soon(
+ function() { c.save( { a : 6 } );
+ return rawMongoProgramOutput().match( /file allocation failure/ );
+ },
+ "didn't see 'file allocation failure'" );
c.save( { a: 6 } );
assert.eq(d.getLastError(), "Can't take a write lock while out of disk space"); // every following fail