diff options
author | Eliot Horowitz <eliot@10gen.com> | 2010-11-08 00:25:11 -0500 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2010-11-08 00:25:55 -0500 |
commit | 2d3e8a8b73f55f74efaf0d0a49cd4b6a9fc1d815 (patch) | |
tree | 080ba885e2a12cdb292d0f40e064d297c8dd8df5 | |
parent | 3fcb3616f201f15eaeb63a5dfb73e767de445be1 (diff) | |
download | mongo-2d3e8a8b73f55f74efaf0d0a49cd4b6a9fc1d815.tar.gz |
old test for non-blocking eval
-rw-r--r-- | jstests/eval_nolock.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/jstests/eval_nolock.js b/jstests/eval_nolock.js new file mode 100644 index 00000000000..2688ec5ca0e --- /dev/null +++ b/jstests/eval_nolock.js @@ -0,0 +1,16 @@ + +t = db.eval_nolock +t.drop(); + +for ( i=0; i<10; i++ ) + t.insert( { _id : i } ); + +res = db.runCommand( { eval : + function(){ + db.eval_nolock.insert( { _id : 123 } ); + return db.eval_nolock.count(); + } + , nlock : true } ); + +assert.eq( 11 , res.retval , "A" ) + |