From bcbff207d62a90c49f3944f606f930bb254f5d3f Mon Sep 17 00:00:00 2001 From: Kihwal Lee Date: Tue, 1 Mar 2016 17:01:37 -0600 Subject: [PATCH] HDFS-9880. TestDatanodeRegistration fails occasionally. Contributed by Kihwal Lee. (cherry picked from commit e76b13c415459e4062c4c9660a16759a11ffb34a) --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 2 ++ .../org/apache/hadoop/hdfs/TestDatanodeRegistration.java | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 8ddbdfe5bb2..5ac926e10f8 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -2015,6 +2015,8 @@ Release 2.7.3 - UNRELEASED HDFS-9864. Correct reference for RENEWDELEGATIONTOKEN and CANCELDELEGATIONTOKEN in webhdfs doc. (Brahma Reddy Battula via aajisaka) + HDFS-9880. TestDatanodeRegistration fails occasionally (kihwal) + Release 2.7.2 - 2016-01-25 INCOMPATIBLE CHANGES diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDatanodeRegistration.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDatanodeRegistration.java index ccac99fe1d2..46bf2cabba6 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDatanodeRegistration.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDatanodeRegistration.java @@ -325,7 +325,7 @@ public class TestDatanodeRegistration { // should not occur other than dead/unregistered node which will trigger a // re-registration. If a non-IPC exception does occur, the safety net is // a forced re-registration on the next heartbeat. - @Test(timeout=10000) + @Test public void testForcedRegistration() throws Exception { final Configuration conf = new HdfsConfiguration(); conf.setInt(DFSConfigKeys.DFS_NAMENODE_HANDLER_COUNT_KEY, 4); @@ -440,10 +440,10 @@ public class TestDatanodeRegistration { public Boolean get() { return lastCount != storage.getBlockReportCount(); } - }, 10, 100); + }, 10, 2000); } catch (TimeoutException te) { return false; } return true; } -} \ No newline at end of file +}