0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00

SERVER-25307 Use ensurePrimaryShard() to increase stability of validate_collection.js test

This commit is contained in:
Spencer T Brody 2016-07-27 15:17:40 -04:00
parent 16ecaadd49
commit 03a14ef5a6

View File

@ -53,6 +53,7 @@
// 2. Sharded collection in a DB.
assert.commandWorked(s.adminCommand({enableSharding: 'test'}));
st.ensurePrimaryShard('test', st.shard0.shardName);
assert.commandWorked(s.adminCommand({shardCollection: 'test.test', key: {_id: 1}}));
assert.commandWorked(s.adminCommand({shardCollection: 'test.dummy', key: {_id: 1}}));
validate(true);