diff options
Diffstat (limited to 'jstests/core/explain_upsert.js')
-rw-r--r-- | jstests/core/explain_upsert.js | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/jstests/core/explain_upsert.js b/jstests/core/explain_upsert.js index 41282e9bf51..1ac254291f1 100644 --- a/jstests/core/explain_upsert.js +++ b/jstests/core/explain_upsert.js @@ -6,14 +6,8 @@ t.drop(); var explain; // Explained upsert against an empty collection should succeed and be a no-op. -explain = db.runCommand({ - explain: { - update: t.getName(), - updates: [ - {q: {a: 1}, u: {a: 1}, upsert: true} - ] - } -}); +explain = db.runCommand( + {explain: {update: t.getName(), updates: [{q: {a: 1}, u: {a: 1}, upsert: true}]}}); assert.commandWorked(explain); // Collection should still not exist. @@ -24,13 +18,7 @@ assert(!t.drop()); t.insert({a: 3}); // An explained upsert against a non-empty collection should also succeed as a no-op. -explain = db.runCommand({ - explain: { - update: t.getName(), - updates: [ - {q: {a: 1}, u: {a: 1}, upsert: true} - ] - } -}); +explain = db.runCommand( + {explain: {update: t.getName(), updates: [{q: {a: 1}, u: {a: 1}, upsert: true}]}}); assert.commandWorked(explain); assert.eq(1, t.count()); |