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

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

function checkgle(iteration) {
    var gle = db.getLastErrorObj();
    assert.eq(2, gle.n, "failed on iteration " + iteration + ", getLastErrorObj()=" + tojson(gle));
}

t.insert( { x : 1 } );
t.insert( { x : 1 } );
updateReturn = t.update( {} , { $inc : { x : 2 } } , false , true );

for ( i=0; i<100; i++ ) {
    checkgle(""+i);
}

db.adminCommand( { replSetGetStatus : 1 , forShell : 1 } );
shellPrintHelper( updateReturn )
replSetMemberStatePrompt()

checkgle("'final'");