Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

make test more reliable SERVER-2376

  • Loading branch information...
commit 743bb6f02b2ddccff5394cb071f29c3a26355588 1 parent b605e4d
@erh erh authored
Showing with 5 additions and 3 deletions.
  1. +5 −3 jstests/datasize3.js
View
8 jstests/datasize3.js
@@ -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 );
Please sign in to comment.
Something went wrong with that request. Please try again.