Quellcode durchsuchen

HADOOP-19506. Fix TestThrottledInputStream when bandwidth is equal to throttle limit (#7517) Contributed by Istvan Toth.

Signed-off-by: Shilun Fan <slfan1989@apache.org>
Istvan Toth vor 1 Monat
Ursprung
Commit
f9f9aeefc6

+ 1 - 1
hadoop-tools/hadoop-distcp/src/test/java/org/apache/hadoop/tools/util/TestThrottledInputStream.java

@@ -216,7 +216,7 @@ public class TestThrottledInputStream {
       assertEquals(in.getTotalBytesRead(), tmpFile.length());
 
       long bytesPerSec = in.getBytesPerSec();
-      assertTrue(bytesPerSec < maxBPS);
+      assertTrue(bytesPerSec <= maxBPS);
     } finally {
       IOUtils.closeStream(in);
       IOUtils.closeStream(out);