mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
17 lines
339 B
JavaScript
17 lines
339 B
JavaScript
|
|
||
|
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" )
|
||
|
|