summaryrefslogtreecommitdiff
path: root/jstests/sharding/merge_chunks_test.js
diff options
context:
space:
mode:
authorsamantharitter <samantha.ritter@10gen.com>2017-10-10 16:42:43 -0400
committerKaloian Manassiev <kaloian.manassiev@mongodb.com>2017-10-10 17:58:36 -0400
commit953df5a1f04dafa56d1c1fb37f66438ba0698d4e (patch)
tree44132a40a0f145878cc0c47e2e6443952b2df3e2 /jstests/sharding/merge_chunks_test.js
parent9094279371cc1573fed720541555d9ae05a36eb4 (diff)
downloadmongo-953df5a1f04dafa56d1c1fb37f66438ba0698d4e.tar.gz
SERVER-31184 Make sharding tests only consider chunks for collections they actually use
Diffstat (limited to 'jstests/sharding/merge_chunks_test.js')
-rw-r--r--jstests/sharding/merge_chunks_test.js22
1 files changed, 13 insertions, 9 deletions
diff --git a/jstests/sharding/merge_chunks_test.js b/jstests/sharding/merge_chunks_test.js
index 1725657b0ad..5d3bfbbb97b 100644
--- a/jstests/sharding/merge_chunks_test.js
+++ b/jstests/sharding/merge_chunks_test.js
@@ -128,15 +128,19 @@
st.printShardingStatus(true);
- assert.eq(2, st.s0.getDB('config').chunks.find({}).itcount());
- assert.eq(1,
- st.s0.getDB('config')
- .chunks.find({'min._id': MinKey, 'max._id': 90, shard: st.shard0.shardName})
- .itcount());
- assert.eq(1,
- st.s0.getDB('config')
- .chunks.find({'min._id': 90, 'max._id': MaxKey, shard: st.shard1.shardName})
- .itcount());
+ assert.eq(2, st.s0.getDB('config').chunks.find({'ns': 'foo.bar'}).itcount());
+ assert.eq(
+ 1,
+ st.s0.getDB('config')
+ .chunks
+ .find({'ns': 'foo.bar', 'min._id': MinKey, 'max._id': 90, shard: st.shard0.shardName})
+ .itcount());
+ assert.eq(
+ 1,
+ st.s0.getDB('config')
+ .chunks
+ .find({'ns': 'foo.bar', 'min._id': 90, 'max._id': MaxKey, shard: st.shard1.shardName})
+ .itcount());
st.stop();
})();