summaryrefslogtreecommitdiff
path: root/jstests/core/opcounters_write_cmd.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/core/opcounters_write_cmd.js')
-rw-r--r--jstests/core/opcounters_write_cmd.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/jstests/core/opcounters_write_cmd.js b/jstests/core/opcounters_write_cmd.js
index 2aef8fe72c5..3ffdac0b0b5 100644
--- a/jstests/core/opcounters_write_cmd.js
+++ b/jstests/core/opcounters_write_cmd.js
@@ -31,13 +31,13 @@ t.drop();
// Single insert, no error.
opCounters = newdb.serverStatus().opcounters;
res = t.insert({_id: 0});
-assert.writeOK(res);
+assert.commandWorked(res);
assert.eq(opCounters.insert + 1, newdb.serverStatus().opcounters.insert);
// Bulk insert, no error.
opCounters = newdb.serverStatus().opcounters;
res = t.insert([{_id: 1}, {_id: 2}]);
-assert.writeOK(res);
+assert.commandWorked(res);
assert.eq(opCounters.insert + 2, newdb.serverStatus().opcounters.insert);
// Test is not run when in compatibility mode as errors are not counted
@@ -71,7 +71,7 @@ t.insert({_id: 0});
// Update, no error.
opCounters = newdb.serverStatus().opcounters;
res = t.update({_id: 0}, {$set: {a: 1}});
-assert.writeOK(res);
+assert.commandWorked(res);
assert.eq(opCounters.update + 1, newdb.serverStatus().opcounters.update);
// Update, with error.
@@ -90,7 +90,7 @@ t.insert([{_id: 0}, {_id: 1}]);
// Delete, no error.
opCounters = newdb.serverStatus().opcounters;
res = t.remove({_id: 0});
-assert.writeOK(res);
+assert.commandWorked(res);
assert.eq(opCounters.delete + 1, newdb.serverStatus().opcounters.delete);
// Delete, with error.