~ubuntu-branches/ubuntu/trusty/mongodb/trusty-proposed

« back to all changes in this revision

Viewing changes to jstests/quota/quota1.js

  • Committer: Bazaar Package Importer
  • Author(s): Antonin Kral
  • Date: 2010-01-29 19:48:45 UTC
  • Revision ID: james.westby@ubuntu.com-20100129194845-8wbmkf626fwcavc9
Tags: upstream-1.3.1
ImportĀ upstreamĀ versionĀ 1.3.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
t = db.quota1;
 
2
 
 
3
print( "starting quota1.a" );
 
4
assert.throws( 
 
5
    function(z){
 
6
        db.eval(
 
7
            function(){
 
8
                db.quota1a.save( { a : 1 } );
 
9
                var a = 5;
 
10
                while ( true ){
 
11
                    a += 2;
 
12
                }
 
13
            }
 
14
        )
 
15
    }
 
16
);
 
17
print( "done quota1.a" );
 
18
 
 
19
//print( "starting quota1.b" );
 
20
//assert.throws( 
 
21
//    function(z){
 
22
//        db.eval(
 
23
//            function(){
 
24
//                db.quota1b.save( { a : 1 } );
 
25
//                var a = 5;
 
26
//                assert( sleep( 150000 ) );
 
27
//            }
 
28
//        )
 
29
//    }
 
30
//);
 
31
//print( "done quota1.b" );
 
32
//
 
33
//print( "starting quota1.c" );
 
34
//assert.throws( 
 
35
//    function(z){
 
36
//        db.eval(
 
37
//            function(){
 
38
//                db.quota1c.save( { a : 1 } );
 
39
//                var a = 1;
 
40
//                while ( true ){
 
41
//                    a += 1;
 
42
//                    assert( sleep( 1000 ) );
 
43
//                }
 
44
//            }
 
45
//        )
 
46
//    }
 
47
//);
 
48
//print( "done quota1.c" );