diff options
Diffstat (limited to 'jstests/core/projection_dotted_paths.js')
-rw-r--r-- | jstests/core/projection_dotted_paths.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/jstests/core/projection_dotted_paths.js b/jstests/core/projection_dotted_paths.js index 5af357bde02..48c2f1ae89f 100644 --- a/jstests/core/projection_dotted_paths.js +++ b/jstests/core/projection_dotted_paths.js @@ -14,7 +14,7 @@ load("jstests/libs/analyze_plan.js"); let coll = db["projection_dotted_paths"]; coll.drop(); assert.commandWorked(coll.createIndex({a: 1, "b.c": 1, "b.d": 1, c: 1})); -assert.writeOK(coll.insert({_id: 1, a: 1, b: {c: 1, d: 1, e: 1}, c: 1, e: 1})); +assert.commandWorked(coll.insert({_id: 1, a: 1, b: {c: 1, d: 1, e: 1}, c: 1, e: 1})); // Project exactly the set of fields in the index. Verify that the projection is computed // correctly and that the plan is covered. @@ -64,7 +64,7 @@ assert(isIdhack(db, explain.queryPlanner.winningPlan)); // If we make a dotted path multikey, projections using that path cannot be covered. But // projections which do not include the multikey path can still be covered. -assert.writeOK(coll.insert({a: 2, b: {c: 1, d: [1, 2, 3]}})); +assert.commandWorked(coll.insert({a: 2, b: {c: 1, d: [1, 2, 3]}})); resultDoc = coll.findOne({a: 2}, {_id: 0, "b.c": 1, "b.d": 1}); assert.eq(resultDoc, {b: {c: 1, d: [1, 2, 3]}}); @@ -81,7 +81,7 @@ assert(isIndexOnly(db, explain.queryPlanner.winningPlan)); // Verify that dotted projections work for multiple levels of nesting. assert.commandWorked(coll.createIndex({a: 1, "x.y.y": 1, "x.y.z": 1, "x.z": 1})); -assert.writeOK(coll.insert({a: 3, x: {y: {y: 1, f: 1, z: 1}, f: 1, z: 1}})); +assert.commandWorked(coll.insert({a: 3, x: {y: {y: 1, f: 1, z: 1}, f: 1, z: 1}})); resultDoc = coll.findOne({a: 3}, {_id: 0, "x.y.y": 1, "x.y.z": 1, "x.z": 1}); assert.eq(resultDoc, {x: {y: {y: 1, z: 1}, z: 1}}); explain = coll.find({a: 3}, {_id: 0, "x.y.y": 1, "x.y.z": 1, "x.z": 1}).explain("queryPlanner"); |