Browse Source

HDFS-9300. TestDirectoryScanner.testThrottle() is still a little flakey. Contributed by Daniel Templeton.

Andrew Wang 9 years ago
parent
commit
3c0adac88c

+ 3 - 0
hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt

@@ -901,6 +901,9 @@ Release 2.9.0 - UNRELEASED
 
     HDFS-9371. Code cleanup for DatanodeManager. (jing9)
 
+    HDFS-9300. TestDirectoryScanner.testThrottle() is still a little flakey.
+    (Daniel Templeton via wang)
+
   OPTIMIZATIONS
 
   BUG FIXES

+ 2 - 2
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDirectoryScanner.java

@@ -601,7 +601,7 @@ public class TestDirectoryScanner {
       ratio = 0.0f;
       retries = maxRetries;
 
-      while ((retries > 0) && ((ratio < 3f) || (ratio > 4.5f))) {
+      while ((retries > 0) && ((ratio < 2.75f) || (ratio > 4.5f))) {
         scanner = new DirectoryScanner(dataNode, fds, conf);
         ratio = runThrottleTest(blocks);
         retries -= 1;
@@ -610,7 +610,7 @@ public class TestDirectoryScanner {
       // Waiting should be about 4x running.
       LOG.info("RATIO: " + ratio);
       assertTrue("Throttle is too restrictive", ratio <= 4.5f);
-      assertTrue("Throttle is too permissive", ratio >= 3.0f);
+      assertTrue("Throttle is too permissive", ratio >= 2.75f);
 
       // Test with more than 1 thread
       conf.setInt(DFSConfigKeys.DFS_DATANODE_DIRECTORYSCAN_THREADS_KEY, 3);