diff options
Diffstat (limited to 'jstests/evalf.js')
-rw-r--r-- | jstests/evalf.js | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/jstests/evalf.js b/jstests/evalf.js new file mode 100644 index 0000000..12d0192 --- /dev/null +++ b/jstests/evalf.js @@ -0,0 +1,26 @@ +// test that killing a parent op interrupts the child op + +t = db.jstests_evalf; +t.drop(); + +if ( typeof _threadInject == "undefined" ) { // don't run in v8 mode - SERVER-1900 + +db.eval( function() { + opid = null; + while( opid == null ) { + ops = db.currentOp().inprog; + for( i in ops ) { + o = ops[ i ]; + if ( o.active && o.query && o.query.$eval ) { + opid = o.opid; + } + } + } + db.jstests_evalf.save( {opid:opid} ); + db.jstests_evalf.count( { $where:function() { + db.killOp( db.jstests_evalf.findOne().opid ); + while( 1 ) { ; } + } } ); + } ); + +}
\ No newline at end of file |