diff options
author | Jason Chan <jason.chan@10gen.com> | 2021-05-28 10:58:56 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-06-01 15:02:39 +0000 |
commit | 2e9443c048cf3dd5199fd19f9e532f3f946ffd43 (patch) | |
tree | b8b4bbde5c5a420fae13919ff8ae77ee9560828f | |
parent | 5339712ac3d71198ca06fa6894c787010d2d5d96 (diff) | |
download | mongo-2e9443c048cf3dd5199fd19f9e532f3f946ffd43.tar.gz |
SERVER-57282 Add requires_document_locking to retryable findAndModify downgrade FCV tests
-rw-r--r-- | jstests/multiVersion/retry_find_and_modify_across_downgrade_fcv.js | 2 | ||||
-rw-r--r-- | jstests/multiVersion/store_find_and_modify_in_oplog_on_downgrade_fcv.js | 10 |
2 files changed, 8 insertions, 4 deletions
diff --git a/jstests/multiVersion/retry_find_and_modify_across_downgrade_fcv.js b/jstests/multiVersion/retry_find_and_modify_across_downgrade_fcv.js index bbe82cfbdbc..8d9ada83cd5 100644 --- a/jstests/multiVersion/retry_find_and_modify_across_downgrade_fcv.js +++ b/jstests/multiVersion/retry_find_and_modify_across_downgrade_fcv.js @@ -2,6 +2,8 @@ * Tests that when storeFindAndModifyImagesInSideCollection=true, retrying a findAndModify after an * FCV downgrade will return an error indicating that no write history was found for the * transaction. + * + * @tags: [requires_document_locking] */ (function() { diff --git a/jstests/multiVersion/store_find_and_modify_in_oplog_on_downgrade_fcv.js b/jstests/multiVersion/store_find_and_modify_in_oplog_on_downgrade_fcv.js index 224de2e76ca..0506abe07b4 100644 --- a/jstests/multiVersion/store_find_and_modify_in_oplog_on_downgrade_fcv.js +++ b/jstests/multiVersion/store_find_and_modify_in_oplog_on_downgrade_fcv.js @@ -1,6 +1,8 @@ /** * Tests that retryable findAndModify will store images in the oplog while the server is in the * downgraded FCV, even if storeFindAndModifyImagesInSideCollection=true. + * + * @tags: [requires_document_locking] */ (function() { @@ -142,10 +144,10 @@ } checkFCV(primaryAdminDB, latestFCV); - // By default, the parameter is set to false. - const result = assert.commandWorked( - primaryAdminDB.runCommand({getParameter: 1, storeFindAndModifyImagesInSideCollection: 1})); - assert.eq(false, result.storeFindAndModifyImagesInSideCollection, result); + // By default, the parameter is set to false. Set it explicitly in case this test is running + // on the build variant which enables this parameter. + assert.commandWorked(primaryAdminDB.runCommand( + {setParameter: 1, storeFindAndModifyImagesInSideCollection: false})); // findAndModify writes store images in the oplog while the parameter is turned off. runTest(true /* storeInOplog */); |