diff options
Diffstat (limited to 'jstests/core/index_bounds_code.js')
-rw-r--r-- | jstests/core/index_bounds_code.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/jstests/core/index_bounds_code.js b/jstests/core/index_bounds_code.js index cd1fa58b306..52eec12c26b 100644 --- a/jstests/core/index_bounds_code.js +++ b/jstests/core/index_bounds_code.js @@ -12,7 +12,7 @@ assert.commandWorked(coll.createIndex({a: 1})); const insertedFunc = function() { return 1; }; -assert.writeOK(coll.insert({a: insertedFunc})); +assert.commandWorked(coll.insert({a: insertedFunc})); // Test that queries involving comparison operators with values of type Code are covered. const proj = { @@ -39,9 +39,9 @@ assertCoveredQueryAndCount( // Test that documents that lie outside of the generated index bounds are not returned. coll.remove({}); -assert.writeOK(coll.insert({a: "string"})); -assert.writeOK(coll.insert({a: {b: 1}})); -assert.writeOK(coll.insert({a: MaxKey})); +assert.commandWorked(coll.insert({a: "string"})); +assert.commandWorked(coll.insert({a: {b: 1}})); +assert.commandWorked(coll.insert({a: MaxKey})); assertCoveredQueryAndCount({collection: coll, query: {a: {$gt: func}}, project: proj, count: 0}); assertCoveredQueryAndCount({collection: coll, query: {a: {$gte: func}}, project: proj, count: 0}); |