summaryrefslogtreecommitdiff
path: root/jstests/evalc.js
blob: 0320ecd51337c7e1fc9ccbdf7bdd2550103ee6c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
t = db.jstests_evalc;
t.drop();

t2 = db.evalc_done
t2.drop()

for( i = 0; i < 10; ++i ) {
    t.save( {i:i} );
}

// SERVER-1610

assert.eq( 0 , t2.count() , "X1" )

s = startParallelShell( "print( 'starting forked:' + Date() ); for ( i=0; i<50000; i++ ){ db.currentOp(); } print( 'ending forked:' + Date() ); db.evalc_done.insert( { x : 1 } ); " )

print( "starting eval: " + Date() )
while ( true ) {
    db.eval( "db.jstests_evalc.count( {i:10} );" );
    if ( t2.count() > 0 )
        break;
}
print( "end eval: " + Date() )

s();