blob: cf24d4468d3b08dc2cebd1624fbf308ca2bf98e1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
// 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);
|