Permalink
Browse files

make test more reliable SERVER-2376

  • Loading branch information...
1 parent b605e4d commit 743bb6f02b2ddccff5394cb071f29c3a26355588 @erh erh committed Jan 19, 2011
Showing with 5 additions and 3 deletions.
  1. +5 −3 jstests/datasize3.js
View
@@ -22,10 +22,12 @@ t.ensureIndex( { x : 1 } )
for ( i=2; i<100; i++ )
t.insert( { x : i } )
-a = run( { min : { x : 20 } , max : { x : 50 } } )
-b = run( { min : { x : 20 } , max : { x : 50 } , estimate : true } )
+a = run( { min : { x : 20 } , max : { x : 50 } } ).size
+b = run( { min : { x : 20 } , max : { x : 50 } , estimate : true } ).size
-assert.eq( a.size , b.size );
+ratio = Math.min( a , b ) / Math.max( a , b );
+
+assert.lt( 0.97 , ratio , "sizes not equal a: " + a + " b: " + b );

0 comments on commit 743bb6f

Please sign in to comment.