Skip to content
Browse files

datasize maxSize test

  • Loading branch information...
1 parent 2531a6c commit f1114721c669e7d0d2fd3f3fe26b6d9be2c43e75 @erh erh committed
Showing with 27 additions and 0 deletions.
  1. +27 −0 jstests/datasize2.js
View
27 jstests/datasize2.js
@@ -0,0 +1,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" )
+

0 comments on commit f111472

Please sign in to comment.
Something went wrong with that request. Please try again.