summaryrefslogtreecommitdiff
path: root/jstests/aggregation/bugs/server18222.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/aggregation/bugs/server18222.js')
-rw-r--r--jstests/aggregation/bugs/server18222.js22
1 files changed, 11 insertions, 11 deletions
diff --git a/jstests/aggregation/bugs/server18222.js b/jstests/aggregation/bugs/server18222.js
index d27188bbb2b..3a05eb99f61 100644
--- a/jstests/aggregation/bugs/server18222.js
+++ b/jstests/aggregation/bugs/server18222.js
@@ -5,19 +5,19 @@ var coll = db.is_array_expr;
coll.drop();
// Non-array types.
-assert.writeOK(coll.insert({_id: 0, x: 0}));
-assert.writeOK(coll.insert({_id: 1, x: '0'}));
-assert.writeOK(coll.insert({_id: 2, x: new ObjectId()}));
-assert.writeOK(coll.insert({_id: 3, x: new NumberLong(0)}));
-assert.writeOK(coll.insert({_id: 4, x: {y: []}}));
-assert.writeOK(coll.insert({_id: 5, x: null}));
-assert.writeOK(coll.insert({_id: 6, x: NaN}));
-assert.writeOK(coll.insert({_id: 7, x: undefined}));
+assert.commandWorked(coll.insert({_id: 0, x: 0}));
+assert.commandWorked(coll.insert({_id: 1, x: '0'}));
+assert.commandWorked(coll.insert({_id: 2, x: new ObjectId()}));
+assert.commandWorked(coll.insert({_id: 3, x: new NumberLong(0)}));
+assert.commandWorked(coll.insert({_id: 4, x: {y: []}}));
+assert.commandWorked(coll.insert({_id: 5, x: null}));
+assert.commandWorked(coll.insert({_id: 6, x: NaN}));
+assert.commandWorked(coll.insert({_id: 7, x: undefined}));
// Array types.
-assert.writeOK(coll.insert({_id: 8, x: []}));
-assert.writeOK(coll.insert({_id: 9, x: [0]}));
-assert.writeOK(coll.insert({_id: 10, x: ['0']}));
+assert.commandWorked(coll.insert({_id: 8, x: []}));
+assert.commandWorked(coll.insert({_id: 9, x: [0]}));
+assert.commandWorked(coll.insert({_id: 10, x: ['0']}));
// Project field is_array to represent whether the field x was an array.
var results = coll.aggregate([