summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEsha Maharishi <esha.maharishi@mongodb.com>2017-06-16 17:43:36 -0400
committerMatthew Saltz <matthew.saltz@mongodb.com>2018-08-27 11:38:51 -0400
commit83c3022fe451cbfad39dae40d5d804a26fdc4128 (patch)
tree5394a5d15938ebccfbb8a85e1cf1cd82ddd95362
parent0736e45adfd738ec6b87e14e935e9405e6d5aabc (diff)
downloadmongo-83c3022fe451cbfad39dae40d5d804a26fdc4128.tar.gz
SERVER-29702 add assert.commandWorked() around addShard in shard_insert_getlasterror_w2.js
(cherry picked from commit e5eb1981a68bfc3250b72ca14a9131e2749b4cf7)
-rw-r--r--jstests/sharding/shard_insert_getlasterror_w2.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/jstests/sharding/shard_insert_getlasterror_w2.js b/jstests/sharding/shard_insert_getlasterror_w2.js
index 09ea5b5ec46..ac80ebade7f 100644
--- a/jstests/sharding/shard_insert_getlasterror_w2.js
+++ b/jstests/sharding/shard_insert_getlasterror_w2.js
@@ -42,7 +42,7 @@
var testDB = mongosConn.getDB(testDBName);
// Add replSet1 as only shard
- mongosConn.adminCommand({addshard: replSet1.getURL()});
+ assert.commandWorked(mongosConn.adminCommand({addshard: replSet1.getURL()}));
// Enable sharding on test db and its collection foo
assert.commandWorked(mongosConn.getDB('admin').runCommand({enablesharding: testDBName}));
@@ -51,7 +51,7 @@
{shardcollection: testDBName + '.' + testCollName, key: {x: 1}}));
// Test case where GLE should return an error
- testDB.foo.insert({_id: 'a', x: 1});
+ assert.writeOK(testDB.foo.insert({_id: 'a', x: 1}));
assert.writeError(testDB.foo.insert({_id: 'a', x: 1}, {writeConcern: {w: 2, wtimeout: 30000}}));
// Add more data