diff options
author | Benety Goh <benety@mongodb.com> | 2020-05-29 13:42:09 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-05-29 18:21:52 +0000 |
commit | 84a7b81a73c7abfff42823b87612c9d50ea50e67 (patch) | |
tree | c0cef1451250f54cf7350942b6a14efabfa11161 /jstests/concurrency | |
parent | 078c7d7ee6c47983d5c358ab494840c1b58d8637 (diff) | |
download | mongo-84a7b81a73c7abfff42823b87612c9d50ea50e67.tar.gz |
SERVER-48407 Concurrency suites creating and dropping indexes should expect the NoMatchingDocument error code
Diffstat (limited to 'jstests/concurrency')
-rw-r--r-- | jstests/concurrency/fsm_workloads/create_index_background_unique.js | 24 | ||||
-rw-r--r-- | jstests/concurrency/fsm_workloads/drop_index_during_replan.js | 6 |
2 files changed, 18 insertions, 12 deletions
diff --git a/jstests/concurrency/fsm_workloads/create_index_background_unique.js b/jstests/concurrency/fsm_workloads/create_index_background_unique.js index ad9e7081e40..af074da8965 100644 --- a/jstests/concurrency/fsm_workloads/create_index_background_unique.js +++ b/jstests/concurrency/fsm_workloads/create_index_background_unique.js @@ -44,16 +44,20 @@ var $config = (function() { }); // Multi-statement Transactions can fail with SnapshotUnavailable if there are // pending catalog changes as of the transaction start (see SERVER-43018). - assertWorkedOrFailedHandleTxnErrors( - res, - [ - ErrorCodes.IndexBuildAborted, - ErrorCodes.IndexBuildAlreadyInProgress, - ErrorCodes.SnapshotUnavailable, - ErrorCodes.SnapshotTooOld, - ErrorCodes.NotMaster - ], - [ErrorCodes.IndexBuildAborted, ErrorCodes.NotMaster]); + assertWorkedOrFailedHandleTxnErrors(res, + [ + ErrorCodes.IndexBuildAborted, + ErrorCodes.IndexBuildAlreadyInProgress, + ErrorCodes.SnapshotUnavailable, + ErrorCodes.SnapshotTooOld, + ErrorCodes.NoMatchingDocument, + ErrorCodes.NotMaster, + ], + [ + ErrorCodes.IndexBuildAborted, + ErrorCodes.NoMatchingDocument, + ErrorCodes.NotMaster, + ]); } function dropIndex(db, collName) { diff --git a/jstests/concurrency/fsm_workloads/drop_index_during_replan.js b/jstests/concurrency/fsm_workloads/drop_index_during_replan.js index c911079345d..f4f68e0ffb3 100644 --- a/jstests/concurrency/fsm_workloads/drop_index_during_replan.js +++ b/jstests/concurrency/fsm_workloads/drop_index_during_replan.js @@ -46,8 +46,10 @@ var $config = (function() { db[collName].dropIndex({b: 1}); // Recreate the index that was dropped. - assertAlways.commandWorkedOrFailedWithCode(db[collName].createIndex({b: 1}), - [ErrorCodes.IndexBuildAborted]); + assertAlways.commandWorkedOrFailedWithCode(db[collName].createIndex({b: 1}), [ + ErrorCodes.IndexBuildAborted, + ErrorCodes.NoMatchingDocument, + ]); } }; |