summaryrefslogtreecommitdiff
path: root/jstests/sharding/coll_epoch_test0.js
diff options
context:
space:
mode:
authorRandolph Tan <randolph@10gen.com>2015-04-10 18:06:07 -0400
committerRandolph Tan <randolph@10gen.com>2015-05-15 10:11:31 -0400
commit280fbae9044af29bc63068dbe9c4e7846e9e6517 (patch)
tree96b6490b5aa9d8ad0facd9356367ecd5f3534a8d /jstests/sharding/coll_epoch_test0.js
parentf3d242c808ec6c1b7145dd3f084da438829552cb (diff)
downloadmongo-280fbae9044af29bc63068dbe9c4e7846e9e6517.tar.gz
SERVER-18044 Make sharding test explicitly set primary shards for databases
Diffstat (limited to 'jstests/sharding/coll_epoch_test0.js')
-rw-r--r--jstests/sharding/coll_epoch_test0.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/jstests/sharding/coll_epoch_test0.js b/jstests/sharding/coll_epoch_test0.js
index 1b9c6294b85..73614c095f5 100644
--- a/jstests/sharding/coll_epoch_test0.js
+++ b/jstests/sharding/coll_epoch_test0.js
@@ -10,6 +10,7 @@ var coll = st.s.getCollection( "foo.bar" )
// First enable sharding
admin.runCommand({ enableSharding : coll.getDB() + "" })
+st.ensurePrimaryShard(coll.getDB().getName(), 'shard0001');
admin.runCommand({ shardCollection : coll + "", key : { _id : 1 } })
var primary = config.databases.find({ _id : coll.getDB() + "" }).primary
@@ -44,4 +45,4 @@ printjson( admin.runCommand({ moveChunk : coll + "", find : { _id : 0 }, to : no
// Check all the chunks for epochs
checkEpochs();
-st.stop() \ No newline at end of file
+st.stop()