Files
mongo/jstests/core/datasize2.js
Randolph Tan 5595b94560 SERVER-12127 migrate js tests to jscore suite when not related to writes
Moved test jstest/[a-i].js -> jstests/core/ and made changes to comply with write command api
2014-02-28 16:26:33 -05:00

28 lines
441 B
JavaScript

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" )