diff options
author | Aaron <aaron@10gen.com> | 2009-03-23 14:11:53 -0400 |
---|---|---|
committer | Aaron <aaron@10gen.com> | 2009-03-23 14:11:53 -0400 |
commit | d3340fb7aedf267e84ce3cba26cab1e8625fb576 (patch) | |
tree | ce707d941c575402ef4a08e14a930d8375dca2c5 | |
parent | 3426f0e8c7eedd67b14f2742172e615fead8f9c4 (diff) | |
download | mongo-d3340fb7aedf267e84ce3cba26cab1e8625fb576.tar.gz |
Close databases to clear client cursors
-rw-r--r-- | jstests/cursor8.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/jstests/cursor8.js b/jstests/cursor8.js index 9d0eced80d2..169bb5d5deb 100644 --- a/jstests/cursor8.js +++ b/jstests/cursor8.js @@ -2,6 +2,9 @@ db.f.drop(); db.f.save( {} ); db.f.save( {} ); db.f.save( {} ); + +db.getMongo().getDB( "admin" ).runCommand( {closeAllDatabases:1} ); + assert.eq( 0, db.runCommand( {cursorInfo:1} ).clientCursors_size ); assert.eq( 2, db.f.find( {} ).limit( 2 ).toArray().length ); assert.eq( 1, db.runCommand( {cursorInfo:1} ).clientCursors_size ); |