diff options
author | Eliot Horowitz <eliot@10gen.com> | 2009-11-19 21:42:46 -0500 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2009-11-19 21:42:46 -0500 |
commit | daaa53c4c52727a8e47e14da060ad436191c4555 (patch) | |
tree | 8d9083e31dfb6ae1e50f08a484c3588c983f3e33 /jstests/sharding/key_many.js | |
parent | 1c136572d66a7fc103026cbac7b5b053200e940c (diff) | |
download | mongo-daaa53c4c52727a8e47e14da060ad436191c4555.tar.gz |
fix sharding on _id when _id is missing SHARDING-55
Diffstat (limited to 'jstests/sharding/key_many.js')
-rw-r--r-- | jstests/sharding/key_many.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/jstests/sharding/key_many.js b/jstests/sharding/key_many.js index 8fffd789e1f..4e1c3e1a92e 100644 --- a/jstests/sharding/key_many.js +++ b/jstests/sharding/key_many.js @@ -61,7 +61,8 @@ for ( var i=0; i<types.length; i++ ){ assert.eq( 1 , s.config.chunks.find( { ns : longName } ).count() , curT.name + " sanity check A" ); var unsorted = Array.shuffle( Object.extend( [] , curT.values ) ); - for ( var x=0; x<unsorted.length; x++ ) + c.insert( makeObject( unsorted[0] ) ); + for ( var x=1; x<unsorted.length; x++ ) c.save( makeObject( unsorted[x] ) ); assert.eq( 6 , c.find().count() , curT.name + " basic count" ); |