summaryrefslogtreecommitdiff
path: root/jstests/core/push2.js
blob: 5161cc373b69c020a9bfe4ab1ae1ff5e648cac4c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

t = db.push2;
t.drop();

t.save( { _id : 1 , a : [] } );

s = new Array(700000).toString();

gotError = null;

for ( x=0; x<100; x++ ){
    print (x + " pushes");
    var res = t.update( {} , { $push : { a : s } } );
    gotError = res.hasWriteError();
    if ( gotError )
        break;
}

assert( gotError , "should have gotten error" );

t.drop();