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/printShardingStatus.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/printShardingStatus.js')
-rw-r--r-- | jstests/sharding/printShardingStatus.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/jstests/sharding/printShardingStatus.js b/jstests/sharding/printShardingStatus.js index 18bc8bdea6e..c33ca3a1ac5 100644 --- a/jstests/sharding/printShardingStatus.js +++ b/jstests/sharding/printShardingStatus.js @@ -102,7 +102,7 @@ config.getCollectionInfos().forEach(function(c) { assert.commandWorked(configCopy.createCollection(c.name, c.options)); // Clone the docs. config.getCollection(c.name).find().hint({_id: 1}).forEach(function(d) { - assert.writeOK(configCopy.getCollection(c.name).insert(d)); + assert.commandWorked(configCopy.getCollection(c.name).insert(d)); }); // Build the indexes. config.getCollection(c.name).getIndexes().forEach(function(i) { @@ -179,11 +179,11 @@ function testCollDetails(args) { assert.commandWorked(admin.runCommand(cmdObj)); if (args.hasOwnProperty("unique")) { - assert.writeOK(mongos.getDB("config").collections.update({_id: collName}, - {$set: {"unique": args.unique}})); + assert.commandWorked(mongos.getDB("config").collections.update( + {_id: collName}, {$set: {"unique": args.unique}})); } if (args.hasOwnProperty("noBalance")) { - assert.writeOK(mongos.getDB("config").collections.update( + assert.commandWorked(mongos.getDB("config").collections.update( {_id: collName}, {$set: {"noBalance": args.noBalance}})); } @@ -217,7 +217,7 @@ function testCollDetails(args) { mongos.getCollection(collName).drop(); } catch (e) { // Ignore drop errors because they are from the illegal values in the collection entry - assert.writeOK(mongos.getDB("config").collections.remove({_id: collName})); + assert.commandWorked(mongos.getDB("config").collections.remove({_id: collName})); } testCollDetailsNum++; |