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/replsets/read_committed_stale_history.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/replsets/read_committed_stale_history.js')
-rw-r--r-- | jstests/replsets/read_committed_stale_history.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/jstests/replsets/read_committed_stale_history.js b/jstests/replsets/read_committed_stale_history.js index f40841575f4..79564b62821 100644 --- a/jstests/replsets/read_committed_stale_history.js +++ b/jstests/replsets/read_committed_stale_history.js @@ -57,7 +57,7 @@ var primary = rst.getPrimary(); var secondaries = rst.getSecondaries(); assert.eq(nodes[0], primary); // Wait for all data bearing nodes to get up to date. -assert.writeOK(nodes[0].getDB(dbName).getCollection(collName).insert( +assert.commandWorked(nodes[0].getDB(dbName).getCollection(collName).insert( {a: 1}, {writeConcern: {w: 3, wtimeout: rst.kDefaultTimeoutMS}})); // Stop the secondaries from replicating. @@ -67,7 +67,7 @@ assert.commandWorked( nodes[0].adminCommand({configureFailPoint: 'blockHeartbeatStepdown', mode: 'alwaysOn'})); jsTestLog("Do a write that won't ever reach a majority of nodes"); -assert.writeOK(nodes[0].getDB(dbName).getCollection(collName).insert({a: 2})); +assert.commandWorked(nodes[0].getDB(dbName).getCollection(collName).insert({a: 2})); // Ensure that the write that was just done is not visible in the committed snapshot. checkDocNotCommitted(nodes[0], {a: 2}); @@ -90,7 +90,7 @@ restartServerReplication(secondaries); waitForPrimary(nodes[1]); jsTest.log("Do a write to the new primary"); -assert.writeOK(nodes[1].getDB(dbName).getCollection(collName).insert( +assert.commandWorked(nodes[1].getDB(dbName).getCollection(collName).insert( {a: 3}, {writeConcern: {w: 2, wtimeout: rst.kDefaultTimeoutMS}})); // Ensure the new primary still cannot see the write from the old primary. |