summaryrefslogtreecommitdiff
path: root/jstests/noPassthroughWithMongod/sharding_rs2.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/noPassthroughWithMongod/sharding_rs2.js')
-rw-r--r--jstests/noPassthroughWithMongod/sharding_rs2.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/jstests/noPassthroughWithMongod/sharding_rs2.js b/jstests/noPassthroughWithMongod/sharding_rs2.js
index 04cbdeafa4c..117b180a6b5 100644
--- a/jstests/noPassthroughWithMongod/sharding_rs2.js
+++ b/jstests/noPassthroughWithMongod/sharding_rs2.js
@@ -6,6 +6,9 @@ var s = new ShardingTest({ shards: { rs0: { nodes: 2 }, rs1: { nodes: 2 }},
db = s.getDB( "test" )
t = db.foo
+s.adminCommand( { enablesharding : "test" } );
+s.ensurePrimaryShard('test', 'test-rs0');
+
// -------------------------------------------------------------------------------------------
// ---------- test that config server updates when replica set config changes ----------------
// -------------------------------------------------------------------------------------------
@@ -114,7 +117,6 @@ gc(); gc(); gc();
assert.eq( 100 , db.foo.count() , "C1" )
-s.adminCommand( { enablesharding : "test" } );
s.adminCommand( { shardcollection : "test.foo" , key : { x : 1 } } );
// We're doing some manual chunk stuff, so stop the balancer first