Permalink
Browse files

SERVER-6162 adapt sharding/no_empty_reset.js for v2.0

The test jstests/sharding/no_empty_reset.js was using some
functionality that wasn't present in the 2.0 shell.  Add code
to find the shard name manually to adapt for this.
  • Loading branch information...
1 parent 75fa25b commit dd36d37c09408cd0fac5c40b48c071afd7491b1e @tadmarshall tadmarshall committed Jun 27, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 jstests/sharding/no_empty_reset.js
@@ -25,6 +25,7 @@ jsTestLog( "Migrating via first mongos..." )
var fullShard = st.getShard( coll, { _id : 1 } )
var emptyShard = st.getShard( coll, { _id : -1 } )
+fullShard.shardName = st.s.getDB( "config" ).chunks.findOne({ "min._id" : 0 }).shard
var admin = st.s.getDB( "admin" )
printjson( admin.runCommand({ moveChunk : "" + coll, find : { _id : -1 }, to : fullShard.shardName }) )

0 comments on commit dd36d37

Please sign in to comment.