summaryrefslogtreecommitdiff
path: root/jstests
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2011-02-05 15:46:13 -0500
committerEliot Horowitz <eliot@10gen.com>2011-02-05 17:52:36 -0500
commit5287de64fbc3bd412c84a23da7280b3c20853f21 (patch)
tree8abf39e1f707f0a2bbc00c1557e1f4141382e6cb /jstests
parent567480430e62759dcc79303c3add8fb91f05c76a (diff)
downloadmongo-5287de64fbc3bd412c84a23da7280b3c20853f21.tar.gz
fix SlaveOk getMore with replica sets for sharded collections SERVER-2482
Diffstat (limited to 'jstests')
-rw-r--r--jstests/slowNightly/sharding_rs2.js14
1 files changed, 13 insertions, 1 deletions
diff --git a/jstests/slowNightly/sharding_rs2.js b/jstests/slowNightly/sharding_rs2.js
index 4db98bdeed6..7ef0e08d9b0 100644
--- a/jstests/slowNightly/sharding_rs2.js
+++ b/jstests/slowNightly/sharding_rs2.js
@@ -81,7 +81,7 @@ printjson( after )
assert.eq( before.query + 10 , after.query , "B3" )
-// --- sharded ----
+// --- add more data ----
db.foo.ensureIndex( { x : 1 } )
@@ -89,6 +89,13 @@ for ( i=0; i<100; i++ ){
if ( i == 17 ) continue;
db.foo.insert( { x : i } )
}
+db.getLastError( 3 , 10000 );
+
+assert.eq( 100 , ts.count() , "B4" )
+assert.eq( 100 , ts.find().itcount() , "B5" )
+//assert.eq( 100 , ts.find().batchSize(5).itcount() , "B6" )
+
+// --- sharded ----
assert.eq( 100 , db.foo.count() , "C1" )
@@ -142,6 +149,11 @@ after = rs.test.getMaster().adminCommand( "serverStatus" ).opcounters
assert.eq( before.query + 10 , after.query , "E3" )
+assert.eq( 100 , ts.count() , "E4" )
+assert.eq( 100 , ts.find().itcount() , "E5" )
+printjson( ts.find().batchSize(5).explain() )
+assert.eq( 100 , ts.find().batchSize(5).itcount() , "E6" )
+
s.stop()