summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2011-11-02 01:23:32 -0400
committerEliot Horowitz <eliot@10gen.com>2011-11-03 09:59:28 -0400
commit4514def09a5ba6558440acb3186f549687534a9a (patch)
tree5feaf0fdb436f2682bece212b65c7bc5d562b31d
parentbcf4ca44072d45f4e8d87a3341350596ef54bff2 (diff)
downloadmongo-4514def09a5ba6558440acb3186f549687534a9a.tar.gz
make test depend less on sharding internals
-rw-r--r--jstests/slowNightly/large_chunk.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/jstests/slowNightly/large_chunk.js b/jstests/slowNightly/large_chunk.js
index 6cf40e3682f..1f0b2e6f4c7 100644
--- a/jstests/slowNightly/large_chunk.js
+++ b/jstests/slowNightly/large_chunk.js
@@ -13,10 +13,6 @@ db = s.getDB( "test" );
// Step 1 - Test moving a large chunk
//
-// Turn on sharding on the 'test.foo' collection and generate a large chunk
-s.adminCommand( { enablesharding : "test" } );
-s.adminCommand( { shardcollection : "test.foo" , key : { _id : 1 } } );
-
bigString = ""
while ( bigString.length < 10000 )
bigString += "asdasdasdasdadasdasdasdasdasdasdasdasda";
@@ -28,6 +24,11 @@ while ( inserted < ( 400 * 1024 * 1024 ) ){
inserted += bigString.length;
}
db.getLastError();
+
+// Turn on sharding on the 'test.foo' collection and generate a large chunk
+s.adminCommand( { enablesharding : "test" } );
+s.adminCommand( { shardcollection : "test.foo" , key : { _id : 1 } } );
+
assert.eq( 1 , s.config.chunks.count() , "step 1 - need one large chunk" );
primary = s.getServer( "test" ).getDB( "test" );
@@ -48,4 +49,4 @@ assert.neq( before[0].shard , after[0].shard , "move chunk did not work" );
s.config.changelog.find().forEach( printjson )
-s.stop(); \ No newline at end of file
+s.stop();