diff options
author | James Wahlin <james.wahlin@mongodb.com> | 2019-08-14 13:52:59 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2019-08-14 13:52:59 +0000 |
commit | 39c3a5d77b976e131d37476f2e7255d6058f5093 (patch) | |
tree | 01cc28719f215b17196ec913f475cd8efda9b37d /jstests/sharding/change_stream_update_lookup_read_concern.js | |
parent | 69d0dd1dc4fb1f78d21c47aa5dd82aa9077b69eb (diff) | |
download | mongo-39c3a5d77b976e131d37476f2e7255d6058f5093.tar.gz |
SERVER-42773 Replace uses of the assert.writeOK() Javascript assertion with assert.commandWorked()
Diffstat (limited to 'jstests/sharding/change_stream_update_lookup_read_concern.js')
-rw-r--r-- | jstests/sharding/change_stream_update_lookup_read_concern.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/jstests/sharding/change_stream_update_lookup_read_concern.js b/jstests/sharding/change_stream_update_lookup_read_concern.js index 03b9ec86738..3dc1fb47bfd 100644 --- a/jstests/sharding/change_stream_update_lookup_read_concern.js +++ b/jstests/sharding/change_stream_update_lookup_read_concern.js @@ -63,7 +63,7 @@ assert.commandWorked(mongosDB.adminCommand({enableSharding: mongosDB.getName()}) assert.commandWorked( mongosDB.adminCommand({shardCollection: mongosColl.getFullName(), key: {_id: 1}})); -assert.writeOK(mongosColl.insert({_id: 1})); +assert.commandWorked(mongosColl.insert({_id: 1})); rst.awaitReplication(); // Make sure reads with read preference tag 'closestSecondary' go to the tagged secondary. @@ -88,7 +88,7 @@ const changeStream = mongosColl.aggregate([{$changeStream: {fullDocument: "updat comment: changeStreamComment, $readPreference: {mode: "nearest", tags: [{tag: "closestSecondary"}]} }); -assert.writeOK(mongosColl.update({_id: 1}, {$set: {updatedCount: 1}})); +assert.commandWorked(mongosColl.update({_id: 1}, {$set: {updatedCount: 1}})); assert.soon(() => changeStream.hasNext()); let latestChange = changeStream.next(); assert.eq(latestChange.operationType, "update"); @@ -160,7 +160,7 @@ profilerHasSingleMatchingEntryOrThrow({ // the new, lagged secondary. Even though it's lagged, the lookup should use 'afterClusterTime' // to ensure it does not return until the node can see the change it's looking up. stopServerReplication(newClosestSecondary); -assert.writeOK(mongosColl.update({_id: 1}, {$set: {updatedCount: 2}})); +assert.commandWorked(mongosColl.update({_id: 1}, {$set: {updatedCount: 2}})); // Since we stopped replication, we expect the update lookup to block indefinitely until we // resume replication, so we resume replication in a parallel shell while this thread is blocked |