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

(cherry picked from commit 3c0adac88c)
This commit is contained in:
Eric Payne 2017-02-02 15:34:59 -05:00
parent 4f135647fd
commit 4e423edd95
1 changed files with 2 additions and 2 deletions

View File

@ -602,7 +602,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;
@ -611,7 +611,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);