Files
mongo/jstests/disk/diskfull.js
Kaloian Manassiev 7257da6cab SERVER-14243 Fix the MMAP V1 file allocation logic
* Adds a failpoint and updates the disk full error handling.
* Updated the failing diskfull.js
2014-10-10 09:40:21 -04:00

13 lines
436 B
JavaScript

// Enable failpoint
assert.commandWorked(db.adminCommand({configureFailPoint: "allocateDiskFull", mode: "alwaysOn"}));
var d = db.getSisterDB("DiskFullTestDB");
var c = d.getCollection("DiskFullTestCollection");
var writeError1 = c.insert({ a : 6 }).getWriteError();
assert.eq(12520, writeError1.code);
// All subsequent requests should fail
var writeError2 = c.insert({ a : 6 }).getWriteError();
assert.eq(12520, writeError2.code);