diff options
author | Aaron <aaron@10gen.com> | 2009-04-07 15:10:30 -0400 |
---|---|---|
committer | Aaron <aaron@10gen.com> | 2009-04-07 15:10:30 -0400 |
commit | 3f647deaf23ad990547bcc57c1f7f748dfb35ef7 (patch) | |
tree | ab73390d6ed5e2dfae6916e547d427ee40852379 /jstests/quota | |
parent | f35a7f595ecec587bf519cbee358449deb0c3e52 (diff) | |
download | mongo-3f647deaf23ad990547bcc57c1f7f748dfb35ef7.tar.gz |
reinstate quota1 test, add smokeQuota scons target
Diffstat (limited to 'jstests/quota')
-rw-r--r-- | jstests/quota/quota1.js | 49 |
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" ); |