summaryrefslogtreecommitdiff
path: root/jstests/quota
diff options
context:
space:
mode:
authorAaron <aaron@10gen.com>2009-04-07 15:10:30 -0400
committerAaron <aaron@10gen.com>2009-04-07 15:10:30 -0400
commit3f647deaf23ad990547bcc57c1f7f748dfb35ef7 (patch)
treeab73390d6ed5e2dfae6916e547d427ee40852379 /jstests/quota
parentf35a7f595ecec587bf519cbee358449deb0c3e52 (diff)
downloadmongo-3f647deaf23ad990547bcc57c1f7f748dfb35ef7.tar.gz
reinstate quota1 test, add smokeQuota scons target
Diffstat (limited to 'jstests/quota')
-rw-r--r--jstests/quota/quota1.js49
1 files changed, 49 insertions, 0 deletions
diff --git a/jstests/quota/quota1.js b/jstests/quota/quota1.js
new file mode 100644
index 00000000000..3bae50ae23e
--- /dev/null
+++ b/jstests/quota/quota1.js
@@ -0,0 +1,49 @@
+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" );