summaryrefslogtreecommitdiff
path: root/jstests/quota
diff options
context:
space:
mode:
authorAntonin Kral <a.kral@bobek.cz>2010-01-31 08:32:52 +0100
committerAntonin Kral <a.kral@bobek.cz>2010-01-31 08:32:52 +0100
commit4eefaf421bfeddf040d96a3dafb12e09673423d7 (patch)
treecb2e5ccc7f98158894f977ff131949da36673591 /jstests/quota
downloadmongodb-4eefaf421bfeddf040d96a3dafb12e09673423d7.tar.gz
Imported Upstream version 1.3.1
Diffstat (limited to 'jstests/quota')
-rw-r--r--jstests/quota/quota1.js48
1 files changed, 48 insertions, 0 deletions
diff --git a/jstests/quota/quota1.js b/jstests/quota/quota1.js
new file mode 100644
index 0000000..d8f4c42
--- /dev/null
+++ b/jstests/quota/quota1.js
@@ -0,0 +1,48 @@
+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;
+ }
+ }
+ )
+ }
+);
+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" );