0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-28 16:24:56 +01:00
mongodb/jstests/noPassthroughWithMongod/explain2.js
Mathias Stearn d0a1e84ab2 SERVER-13391 Rename slowNightly -> noPassthroughWithMongod and slowWeekly -> noPassthrough
This better represents their purpose and the difference between them.
2014-03-27 17:35:16 -04:00

18 lines
459 B
JavaScript

// Test for race condition SERVER-2807. One cursor is dropped and another is not.
collName = 'jstests_slowNightly_explain2';
t = db[ collName ];
t.drop();
db.createCollection( collName, {capped:true,size:100000} );
t = db[ collName ];
t.ensureIndex( {x:1} );
a = startParallelShell( 'for( i = 0; i < 50000; ++i ) { db.' + collName + '.insert( {x:i,y:1} ); }' );
for( i = 0; i < 800; ++i ) {
t.find( {x:{$gt:-1},y:1} ).sort({x:-1}).explain();
}
a();