summaryrefslogtreecommitdiff
path: root/jstests/replsets/system_profile.js
diff options
context:
space:
mode:
authorJames Wahlin <james.wahlin@mongodb.com>2019-08-14 13:52:59 +0000
committerevergreen <evergreen@mongodb.com>2019-08-14 13:52:59 +0000
commit39c3a5d77b976e131d37476f2e7255d6058f5093 (patch)
tree01cc28719f215b17196ec913f475cd8efda9b37d /jstests/replsets/system_profile.js
parent69d0dd1dc4fb1f78d21c47aa5dd82aa9077b69eb (diff)
downloadmongo-39c3a5d77b976e131d37476f2e7255d6058f5093.tar.gz
SERVER-42773 Replace uses of the assert.writeOK() Javascript assertion with assert.commandWorked()
Diffstat (limited to 'jstests/replsets/system_profile.js')
-rw-r--r--jstests/replsets/system_profile.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/jstests/replsets/system_profile.js b/jstests/replsets/system_profile.js
index 4e525d4fc93..97ba6d7abfd 100644
--- a/jstests/replsets/system_profile.js
+++ b/jstests/replsets/system_profile.js
@@ -18,13 +18,13 @@ var getLatestOp = function() {
};
var primaryDB = rst.getPrimary().getDB('test');
-assert.writeOK(primaryDB.foo.insert({}));
+assert.commandWorked(primaryDB.foo.insert({}));
var op = getLatestOp();
// Enable profiling on the primary
assert.commandWorked(primaryDB.runCommand({profile: 2}));
assert.eq(op, getLatestOp(), "oplog entry created when profile was enabled");
-assert.writeOK(primaryDB.foo.insert({}));
+assert.commandWorked(primaryDB.foo.insert({}));
op = getLatestOp();
assert.commandWorked(primaryDB.runCommand({profile: 0}));
assert.eq(op, getLatestOp(), "oplog entry created when profile was disabled");
@@ -36,7 +36,7 @@ assert.eq(op, getLatestOp(), "oplog entry created when system.profile was droppe
assert.commandWorked(primaryDB.createCollection("system.profile", {capped: true, size: 1000}));
assert.eq(op, getLatestOp(), "oplog entry created when system.profile was created");
assert.commandWorked(primaryDB.runCommand({profile: 2}));
-assert.writeOK(primaryDB.foo.insert({}));
+assert.commandWorked(primaryDB.foo.insert({}));
op = getLatestOp();
assert.commandWorked(primaryDB.runCommand({profile: 0}));