diff --git a/tests/fuzz/crash-fuzz.js b/tests/fuzz/crash-fuzz.js index 7c27d68..50cfdca 100644 --- a/tests/fuzz/crash-fuzz.js +++ b/tests/fuzz/crash-fuzz.js @@ -498,12 +498,10 @@ async function verify(client, base, r, cycleNo) { const coll = db.collection('c'); const dbDocs = await coll.find({}, { sort: { _id: 1 } }).toArray(); const dbMap = new Map(dbDocs.map((d) => [d._id, d])); - // `listIndexes` on a namespace that does not exist is NamespaceNotFound, which - // is what real MongoDB answers too -- and it is the *expected* state whenever - // the surviving prefix contains no write that created the collection (a kill - // during the first in-flight command on a fresh log). Treating it as a harness - // error made any seed whose first cycle crashed at prefix 0 abort the run - // instead of verifying it, which is exactly the case worth verifying. + // listIndexes on a nonexistent namespace answers NamespaceNotFound, as real + // MongoDB does too -- the expected state when a kill lands during the first + // in-flight command on a fresh log. Treating it as a harness error made seeds + // that crashed at prefix 0 abort instead of verifying. const dbIndexes = await coll.indexes().catch((e) => { if (e.code === 26 || /ns not found|NamespaceNotFound/i.test(e.message)) return []; throw e;