mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
50 lines
1008 B
JavaScript
50 lines
1008 B
JavaScript
t = db.quota1;
|
|
|
|
print( "starting quota1.a" );
|
|
assert.throws(
|
|
function(z){
|
|
db.eval(
|
|
function(){
|
|
db.quota1a.save( { a : 1 } );
|
|
var a = 5;
|
|
while ( true ){
|
|
a += 2;
|
|
scope.toString();
|
|
}
|
|
}
|
|
)
|
|
}
|
|
);
|
|
print( "done quota1.a" );
|
|
|
|
print( "starting quota1.b" );
|
|
assert.throws(
|
|
function(z){
|
|
db.eval(
|
|
function(){
|
|
db.quota1b.save( { a : 1 } );
|
|
var a = 5;
|
|
assert( sleep( 150000 ) );
|
|
}
|
|
)
|
|
}
|
|
);
|
|
print( "done quota1.b" );
|
|
|
|
print( "starting quota1.c" );
|
|
assert.throws(
|
|
function(z){
|
|
db.eval(
|
|
function(){
|
|
db.quota1c.save( { a : 1 } );
|
|
var a = 1;
|
|
while ( true ){
|
|
a += 1;
|
|
assert( sleep( 1000 ) );
|
|
}
|
|
}
|
|
)
|
|
}
|
|
);
|
|
print( "done quota1.c" );
|