diff options
author | Cheahuychou Mao <cheahuychou.mao@mongodb.com> | 2018-06-13 10:28:03 -0400 |
---|---|---|
committer | Cheahuychou Mao <cheahuychou.mao@mongodb.com> | 2018-06-14 17:31:31 -0400 |
commit | d54be2fa9beef38399f4771a50e0bd8d3bf70d08 (patch) | |
tree | 36287ccd36e664b7c719931020b967bde2797d7c /jstests/sharding/shard_collection_basic.js | |
parent | f81eb8e9f5166fa6581927945700e5ace4321063 (diff) | |
download | mongo-d54be2fa9beef38399f4771a50e0bd8d3bf70d08.tar.gz |
SERVER-35054 Assert that dropDatabase succeeds in shard_collection_basic.js
Diffstat (limited to 'jstests/sharding/shard_collection_basic.js')
-rw-r--r-- | jstests/sharding/shard_collection_basic.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/jstests/sharding/shard_collection_basic.js b/jstests/sharding/shard_collection_basic.js index 330df5cf39c..f12d4c8482b 100644 --- a/jstests/sharding/shard_collection_basic.js +++ b/jstests/sharding/shard_collection_basic.js @@ -16,7 +16,7 @@ assert.commandFailed(mongos.adminCommand({shardCollection: ns, key: keyDoc})); assert.eq(mongos.getDB('config').collections.count({_id: ns, dropped: false}), 0); - mongos.getDB(kDbName).dropDatabase(); + assert.commandWorked(mongos.getDB(kDbName).dropDatabase()); } function testAndClenaupWithKeyOK(keyDoc) { @@ -29,7 +29,7 @@ assert.commandWorked(mongos.adminCommand({shardCollection: ns, key: keyDoc})); assert.eq(mongos.getDB('config').collections.count({_id: ns, dropped: false}), 1); - mongos.getDB(kDbName).dropDatabase(); + assert.commandWorked(mongos.getDB(kDbName).dropDatabase()); } function testAndClenaupWithKeyNoIndexOK(keyDoc) { @@ -41,7 +41,7 @@ assert.commandWorked(mongos.adminCommand({shardCollection: ns, key: keyDoc})); assert.eq(mongos.getDB('config').collections.count({_id: ns, dropped: false}), 1); - mongos.getDB(kDbName).dropDatabase(); + assert.commandWorked(mongos.getDB(kDbName).dropDatabase()); } function getIndexSpecByName(coll, indexName) { @@ -110,7 +110,7 @@ assert.commandFailed( mongos.adminCommand({shardCollection: kDbName + '.foo', key: {_id: 1}, unique: true})); - mongos.getDB(kDbName).dropDatabase(); + assert.commandWorked(mongos.getDB(kDbName).dropDatabase()); // Shard empty collections no index required. testAndClenaupWithKeyNoIndexOK({_id: 1}); @@ -284,7 +284,7 @@ assert.commandWorked(mongos.getDB(kDbName).createCollection('foo')); assert.commandWorked(mongos.adminCommand({shardCollection: kDbName + '.foo', key: {a: 1}})); - mongos.getDB(kDbName).dropDatabase(); + assert.commandWorked(mongos.getDB(kDbName).dropDatabase()); // // Tests for the shell helper sh.shardCollection(). |