summaryrefslogtreecommitdiff
path: root/jstests/evalc.js
diff options
context:
space:
mode:
authorAntonin Kral <a.kral@bobek.cz>2011-09-14 17:08:06 +0200
committerAntonin Kral <a.kral@bobek.cz>2011-09-14 17:08:06 +0200
commit5d342a758c6095b4d30aba0750b54f13b8916f51 (patch)
tree762e9aa84781f5e3b96db2c02d356c29cf0217c0 /jstests/evalc.js
parentcbe2d992e9cd1ea66af9fa91df006106775d3073 (diff)
downloadmongodb-5d342a758c6095b4d30aba0750b54f13b8916f51.tar.gz
Imported Upstream version 2.0.0
Diffstat (limited to 'jstests/evalc.js')
-rw-r--r--jstests/evalc.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/jstests/evalc.js b/jstests/evalc.js
index 8a9e889..0320ecd 100644
--- a/jstests/evalc.js
+++ b/jstests/evalc.js
@@ -1,17 +1,24 @@
t = db.jstests_evalc;
t.drop();
+t2 = db.evalc_done
+t2.drop()
+
for( i = 0; i < 10; ++i ) {
t.save( {i:i} );
}
// SERVER-1610
-s = startParallelShell( "print( 'starting forked:' + Date() ); for ( i=0; i<500000; i++ ){ db.currentOp(); } print( 'ending forked:' + Date() ); " )
+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() )
-for ( i=0; i<20000; i++ ){
+while ( true ) {
db.eval( "db.jstests_evalc.count( {i:10} );" );
+ if ( t2.count() > 0 )
+ break;
}
print( "end eval: " + Date() )