summaryrefslogtreecommitdiff
path: root/jstests/cursorb.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/cursorb.js')
-rw-r--r--jstests/cursorb.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/jstests/cursorb.js b/jstests/cursorb.js
new file mode 100644
index 00000000000..65e356e89cb
--- /dev/null
+++ b/jstests/cursorb.js
@@ -0,0 +1,17 @@
+// The 'cursor not found in map -1' warning is not logged when get more exhausts a client cursor.
+// SERVER-6931
+
+t = db.jstests_cursorb;
+t.drop();
+
+// Exhaust a client cursor in get more.
+for( i = 0; i < 200; ++i ) {
+ t.save( { a:i } );
+}
+t.find().itcount();
+
+// Check that the 'cursor not found in map -1' message is not printed. This message indicates an
+// attempt to look up a cursor with an invalid id and should never appear in the log.
+log = db.adminCommand( { getLog:'global' } ).log
+log.forEach( function( line ) { assert( !line.match( /cursor not found in map -1 / ),
+ 'Cursor map lookup with id -1.' ); } );