diff options
Diffstat (limited to 'jstests/concurrency/fsm_workloads/collmod.js')
-rw-r--r-- | jstests/concurrency/fsm_workloads/collmod.js | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/jstests/concurrency/fsm_workloads/collmod.js b/jstests/concurrency/fsm_workloads/collmod.js index ef56b6cf408..4fb7945ae52 100644 --- a/jstests/concurrency/fsm_workloads/collmod.js +++ b/jstests/concurrency/fsm_workloads/collmod.js @@ -23,21 +23,23 @@ var $config = (function() { collMod: this.threadCollName, index: {keyPattern: {createdAt: 1}, expireAfterSeconds: newTTL} }); - assertAlways.commandWorked(res); + assertAlways.commandWorkedOrFailedWithCode(res, + [ErrorCodes.ConflictingOperationInProgress]); // only assert if new expireAfterSeconds differs from old one - if (res.hasOwnProperty('expireAfterSeconds_new')) { + if (res.ok === 1 && res.hasOwnProperty('expireAfterSeconds_new')) { assertWhenOwnDB.eq(res.expireAfterSeconds_new, newTTL); } // Attempt an invalid collMod which should always fail regardless of whether a WCE // occurred. This is meant to reproduce SERVER-56772. const encryptSchema = {$jsonSchema: {properties: {_id: {encrypt: {}}}}}; - assertAlways.commandFailedWithCode(db.runCommand({ - collMod: this.threadCollName, - validator: encryptSchema, - validationAction: "warn" - }), - ErrorCodes.QueryFeatureNotAllowed); + assertAlways.commandFailedWithCode( + db.runCommand({ + collMod: this.threadCollName, + validator: encryptSchema, + validationAction: "warn" + }), + [ErrorCodes.ConflictingOperationInProgress, ErrorCodes.QueryFeatureNotAllowed]); } return {collMod: collMod}; |