We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 82d796d commit c671fa1Copy full SHA for c671fa1
src/test/com/mongodb/DBCursorTest.java
@@ -210,6 +210,20 @@ public void testBatchWithLimit(){
210
assertEquals( 50 , c.find().batchSize( 5 ).limit(50).itcount() );
211
}
212
213
+ @Test
214
+ public void testLargeBatch(){
215
+ DBCollection c = _db.getCollection( "largeBatch1" );
216
+ c.drop();
217
+
218
+ int total = 1000000;
219
+ int batch = 100000;
220
+ for ( int i=0; i<total; i++ )
221
+ c.save( new BasicDBObject( "x" , i ) );
222
223
+ DBCursor cursor = c.find().batchSize( batch );
224
+ assertEquals( total , cursor.itcount() );
225
+ assertEquals( total/batch + 1, cursor.getSizes().size());
226
+ }
227
@Test
228
public void testSpecial(){
229
DBCollection c = _db.getCollection( "testSpecial" );
0 commit comments