You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by in...@apache.org on 2020/01/21 21:23:11 UTC

[hadoop] branch trunk updated: HDFS-15126. TestDatanodeRegistration#testForcedRegistration fails intermittently. Contributed by Ahmed Hussein.

This is an automated email from the ASF dual-hosted git repository.

inigoiri pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/trunk by this push:
     new b657822  HDFS-15126. TestDatanodeRegistration#testForcedRegistration fails intermittently. Contributed by Ahmed Hussein.
b657822 is described below

commit b657822b98781f042fad5281c20123e803ebae0f
Author: Inigo Goiri <in...@apache.org>
AuthorDate: Tue Jan 21 13:22:53 2020 -0800

    HDFS-15126. TestDatanodeRegistration#testForcedRegistration fails intermittently. Contributed by Ahmed Hussein.
---
 .../org/apache/hadoop/hdfs/TestDatanodeRegistration.java     | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

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 37042db..77aeff4 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
@@ -364,14 +364,16 @@ public class TestDatanodeRegistration {
       waitForHeartbeat(dn, dnd);
       assertTrue(dnd.isRegistered());
       assertSame(lastReg, dn.getDNRegistrationForBP(bpId));
-      assertTrue(waitForBlockReport(dn, dnd));
+      assertTrue("block report is not processed for DN " + dnd,
+          waitForBlockReport(dn, dnd));
       assertTrue(dnd.isRegistered());
       assertSame(lastReg, dn.getDNRegistrationForBP(bpId));
 
       // check that block report is not processed and registration didn't
       // change.
       dnd.setForceRegistration(true);
-      assertFalse(waitForBlockReport(dn, dnd));
+      assertFalse("block report is processed for DN " + dnd,
+          waitForBlockReport(dn, dnd));
       assertFalse(dnd.isRegistered());
       assertSame(lastReg, dn.getDNRegistrationForBP(bpId));
 
@@ -382,7 +384,8 @@ public class TestDatanodeRegistration {
       newReg = dn.getDNRegistrationForBP(bpId);
       assertNotSame(lastReg, newReg);
       lastReg = newReg;
-      assertTrue(waitForBlockReport(dn, dnd));
+      assertTrue("block report is not processed for DN " + dnd,
+          waitForBlockReport(dn, dnd));
       assertTrue(dnd.isRegistered());
       assertSame(lastReg, dn.getDNRegistrationForBP(bpId));
 
@@ -447,8 +450,9 @@ public class TestDatanodeRegistration {
         public Boolean get() {
           return lastCount != storage.getBlockReportCount();
         }
-      }, 10, 2000);
+      }, 10, 6000);
     } catch (TimeoutException te) {
+      LOG.error("Timeout waiting for block report for {}", dnd);
       return false;
     }
     return true;


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org