summaryrefslogtreecommitdiff
path: root/jstests/disk/diskfull.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/disk/diskfull.js')
-rw-r--r--jstests/disk/diskfull.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/jstests/disk/diskfull.js b/jstests/disk/diskfull.js
index deaab67a969..f236a9d4bc7 100644
--- a/jstests/disk/diskfull.js
+++ b/jstests/disk/diskfull.js
@@ -22,16 +22,16 @@ if ( doIt ) {
m = startMongoProgram( "mongod", "--port", port, "--dbpath", dbpath, "--nohttpinterface", "--bind_ip", "127.0.0.1", '--nojournal' );
d = m.getDB( "diskfulltest" );
c = d.getCollection( "diskfulltest" );
- c.save( { a: 6 } );
- assert(d.getLastError().length );
- printjson( d.getLastErrorObj() );
+ assert.writeError(c.insert( { a: 6 } ));
+
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
+ res = assert.writeError(c.insert({ a: 6 }));
+ var errmsg = res.getWriteError().errmsg;
+ assert.eq(errmsg, "Can't take a write lock while out of disk space"); // every following fail
sleep( 3000 );