0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 01:21:03 +01:00
mongodb/jstests/push2.js

21 lines
417 B
JavaScript

t = db.push2
t.drop()
t.save( { _id : 1 , a : [] } )
var s = "";
while ( s.length < 100000 )
s += "asdasdasdasdasdasdasasdasdasdasdasdasdasasdasdasdasdasdasdasasdasdasdasdasdasdasasdasdasdasdasdasdas";
gotError = null;
for ( x=0; x<200; x++ ){
t.update( {} , { $push : { a : s } } )
gotError = db.getLastError();
if ( gotError )
break;
}
assert( gotError , "should have gotten error" );