summaryrefslogtreecommitdiff
path: root/jstests/sharding/bouncing_count.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/sharding/bouncing_count.js')
-rw-r--r--jstests/sharding/bouncing_count.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/jstests/sharding/bouncing_count.js b/jstests/sharding/bouncing_count.js
index d9630a4e930..c5f22f0b170 100644
--- a/jstests/sharding/bouncing_count.js
+++ b/jstests/sharding/bouncing_count.js
@@ -13,7 +13,8 @@ var collA = mongosA.getCollection( "foo.bar" )
var collB = mongosB.getCollection( "" + collA )
var collC = mongosB.getCollection( "" + collA )
-admin.runCommand({ enableSharding : "" + collA.getDB() })
+admin.runCommand({ enableSharding : "" + collA.getDB() });
+st.ensurePrimaryShard(collA.getDB().getName(), 'shard0001');
admin.runCommand({ shardCollection : "" + collA, key : { _id : 1 } })
var shards = config.shards.find().sort({ _id : 1 }).toArray()
@@ -46,4 +47,4 @@ jsTestLog( "Running count!" )
printjson( collB.count() )
printjson( collC.find().toArray() )
-st.stop() \ No newline at end of file
+st.stop()