diff options
author | Eliot Horowitz <eliot@10gen.com> | 2009-08-11 04:58:19 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2009-08-11 04:58:19 -0400 |
commit | 34fb6220f20580c1f5e4d47cb9270a5cd3b9331d (patch) | |
tree | 4b28cc1d727b7497683cba823887e2a988a3c691 /jstests/sharding/count1.js | |
parent | f0e44b290740367b720f219d28275acb76e9146a (diff) | |
download | mongo-34fb6220f20580c1f5e4d47cb9270a5cd3b9331d.tar.gz |
some more tests
Diffstat (limited to 'jstests/sharding/count1.js')
-rw-r--r-- | jstests/sharding/count1.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/jstests/sharding/count1.js b/jstests/sharding/count1.js index 66000be5b09..dcacf7757ee 100644 --- a/jstests/sharding/count1.js +++ b/jstests/sharding/count1.js @@ -33,11 +33,14 @@ s.adminCommand( { split : "test.foo" , find : { name : "joe" } } ); s.adminCommand( { split : "test.foo" , find : { name : "joe" } } ); assert.eq( 6 , db.foo.find().count() , "basic count after split " ); +assert.eq( 6 , db.foo.find().sort( { name : 1 } ).count() , "basic count after split sorted " ); s.adminCommand( { moveshard : "test.foo" , find : { name : "joe" } , to : seconday.getMongo().name } ); assert.eq( 3 , primary.foo.find().toArray().length , "primary count" ); assert.eq( 3 , seconday.foo.find().toArray().length , "secondary count" ); +assert.eq( 3 , primary.foo.find().sort( { name : 1 } ).toArray().length , "primary count sorted" ); +assert.eq( 3 , seconday.foo.find().sort( { name : 1 } ).toArray().length , "secondary count sorted" ); assert.eq( 6 , db.foo.find().toArray().length , "total count after move" ); assert.eq( 6 , db.foo.find().sort( { name : 1 } ).toArray().length , "total count() sorted" ); |