lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r1592757 - in /lucene/dev/branches/branch_4x: ./ lucene/ lucene/core/ lucene/core/src/test/org/apache/lucene/store/TestRateLimiter.java
Date Tue, 06 May 2014 14:27:36 GMT
Author: mikemccand
Date: Tue May  6 14:27:36 2014
New Revision: 1592757

URL: http://svn.apache.org/r1592757
Log:
fix test bug causing false failure

Modified:
    lucene/dev/branches/branch_4x/   (props changed)
    lucene/dev/branches/branch_4x/lucene/   (props changed)
    lucene/dev/branches/branch_4x/lucene/core/   (props changed)
    lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/store/TestRateLimiter.java

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/store/TestRateLimiter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/store/TestRateLimiter.java?rev=1592757&r1=1592756&r2=1592757&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/store/TestRateLimiter.java
(original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/store/TestRateLimiter.java
Tue May  6 14:27:36 2014
@@ -88,6 +88,9 @@ public final class TestRateLimiter exten
 
     // TODO: this may false trip .... could be we can only assert that it never exceeds the
max, so slow jenkins doesn't trip:
     double ratio = actualMBPerSec/targetMBPerSec;
-    assertTrue("targetMBPerSec=" + targetMBPerSec + " actualMBPerSec=" + actualMBPerSec,
ratio >= 0.9 && ratio <= 1.1);
+
+    // Only enforce that it wasn't too fast; if machine is bogged down (can't schedule threads
/ sleep properly) then it may falsely be too slow:
+    //assertTrue("targetMBPerSec=" + targetMBPerSec + " actualMBPerSec=" + actualMBPerSec,
ratio >= 0.9 && ratio <= 1.1);
+    assertTrue("targetMBPerSec=" + targetMBPerSec + " actualMBPerSec=" + actualMBPerSec,
ratio <= 1.1);
   }
 }



Mime
View raw message