summaryrefslogtreecommitdiff
path: root/jstests/noPassthrough/latency_includes_lock_acquisition_time.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/noPassthrough/latency_includes_lock_acquisition_time.js
parent69d0dd1dc4fb1f78d21c47aa5dd82aa9077b69eb (diff)
downloadmongo-39c3a5d77b976e131d37476f2e7255d6058f5093.tar.gz
SERVER-42773 Replace uses of the assert.writeOK() Javascript assertion with assert.commandWorked()
Diffstat (limited to 'jstests/noPassthrough/latency_includes_lock_acquisition_time.js')
-rw-r--r--jstests/noPassthrough/latency_includes_lock_acquisition_time.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/jstests/noPassthrough/latency_includes_lock_acquisition_time.js b/jstests/noPassthrough/latency_includes_lock_acquisition_time.js
index 5b1757188e7..1532954f96a 100644
--- a/jstests/noPassthrough/latency_includes_lock_acquisition_time.js
+++ b/jstests/noPassthrough/latency_includes_lock_acquisition_time.js
@@ -45,7 +45,7 @@ function runTests() {
// lines, we are just verifying that the log line appears, which implies that the recorded
// latency exceeds slowms.
runWithWait(hangMillis, function() {
- assert.writeOK(testColl.insert({a: 1}));
+ assert.commandWorked(testColl.insert({a: 1}));
});
let profileEntry;
if (conn.writeMode() === "commands") {
@@ -66,7 +66,7 @@ function runTests() {
// Test that update profiler/logs include lock acquisition time.
runWithWait(hangMillis, function() {
- assert.writeOK(testColl.update({}, {$set: {b: 1}}));
+ assert.commandWorked(testColl.update({}, {$set: {b: 1}}));
});
profileEntry = getLatestProfilerEntry(testDB, {
ns: testColl.getFullName(),
@@ -87,7 +87,7 @@ function runTests() {
checkLog.contains(conn, "find { find: \"lock_acquisition_time\"");
// Test that getMore profiler/logs include lock acquisition time.
- assert.writeOK(testColl.insert([{a: 2}, {a: 3}]));
+ assert.commandWorked(testColl.insert([{a: 2}, {a: 3}]));
runWithWait(hangMillis, function() {
// Include a batchSize in order to ensure that a getMore is issued.
assert.eq(3, testColl.find().batchSize(2).itcount());
@@ -98,7 +98,7 @@ function runTests() {
});
assert.gte(profileEntry.millis, hangMillis - padding);
checkLog.contains(conn, "originatingCommand: { find: \"lock_acquisition_time\"");
- assert.writeOK(testColl.remove({a: {$gt: 1}}));
+ assert.commandWorked(testColl.remove({a: {$gt: 1}}));
// Test that aggregate profiler/logs include lock acquisition time.
runWithWait(hangMillis, function() {
@@ -135,7 +135,7 @@ function runTests() {
// Test that delete profiler/logs include lock acquisition time.
runWithWait(hangMillis, function() {
- assert.writeOK(testColl.remove({b: 1}));
+ assert.commandWorked(testColl.remove({b: 1}));
});
profileEntry = getLatestProfilerEntry(testDB, {
ns: testColl.getFullName(),