From eb38d663ade9477810458c0b425da66aaeb8b56a Mon Sep 17 00:00:00 2001 From: Benety Goh Date: Tue, 25 Sep 2018 13:07:19 -0400 Subject: SERVER-36944 applyOps uses applyOperation_inlock() for system.indexes inserts (cherry picked from commit bf2cfbd09d6695e2c84b295c3aa539adaf6496a8) (cherry picked from commit 8fe372afcbad4cd67d46f993291bdc090423caa6) --- jstests/core/apply_ops_invalid_index_spec.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'jstests') diff --git a/jstests/core/apply_ops_invalid_index_spec.js b/jstests/core/apply_ops_invalid_index_spec.js index 47ff5e2e045..d4d9b73ff05 100644 --- a/jstests/core/apply_ops_invalid_index_spec.js +++ b/jstests/core/apply_ops_invalid_index_spec.js @@ -43,16 +43,15 @@ o: {v: 2, key: {a: 1}, name: 'a_1_system_v2', ns: collNs, unknown: 1}, }], }), - ErrorCodes.UnknownError); + ErrorCodes.InvalidIndexSpecificationOption); // Inserting a v:1 index directly into system.indexes with an unknown field in the index spec // should ignore the unrecognized field and create the index. - assert.commandFailedWithCode(db.adminCommand({ + assert.commandWorked(db.adminCommand({ applyOps: [{ op: 'i', ns: systemIndexesNs, o: {v: 1, key: {a: 1}, name: 'a_1_system_v1', ns: collNs, unknown: 1}, }], - }), - ErrorCodes.UnknownError); + })); })(); -- cgit v1.2.1