blob: 103cb2096ee9d2514cf42e84cb36610a92913762 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
t = db.datasize2
t.drop();
N = 1000
for ( i=0; i<N; i++ ){
t.insert( { _id : i , s : "asdasdasdasdasdasdasd" } );
}
c = { dataSize : "test.datasize2" ,
"keyPattern" : {
"_id" : 1
},
"min" : {
"_id" : 0
},
"max" : {
"_id" : N
}
};
assert.eq( N , db.runCommand( c ).numObjects , "A" )
c.maxObjects = 100;
assert.eq( 101 , db.runCommand( c ).numObjects , "B" )
|