diff options
author | Eliot Horowitz <eliot@10gen.com> | 2009-02-26 15:02:18 -0500 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2009-02-26 15:02:18 -0500 |
commit | 76304fd05772345e7c57bb855c9b8a24f5cb1614 (patch) | |
tree | 5c8db98fff65d1a0382c486d3643bf55d643c5ec /jstests/sharding/shard2.js | |
parent | e910263ed246b5964d57e5b45119463ac9b3b67f (diff) | |
download | mongo-76304fd05772345e7c57bb855c9b8a24f5cb1614.tar.gz |
sharded update
Diffstat (limited to 'jstests/sharding/shard2.js')
-rw-r--r-- | jstests/sharding/shard2.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/jstests/sharding/shard2.js b/jstests/sharding/shard2.js index 5a1c7702623..6d35de467ca 100644 --- a/jstests/sharding/shard2.js +++ b/jstests/sharding/shard2.js @@ -128,4 +128,12 @@ function countCursor( c ){ assert.eq( 6 , countCursor( db.foo.find()._exec() ) , "getMore 2" ); assert.eq( 6 , countCursor( db.foo.find().limit(1)._exec() ) , "getMore 3" ); +// update +person = db.foo.findOne( { num : 3 } ); +assert.eq( "bob" , person.name ); +person.name = "bob is gone"; +db.foo.update( { num : 3 } , person ); +person = db.foo.findOne( { num : 3 } ); +assert.eq( "bob is gone" , person.name ); + s.stop(); |