hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aengin...@apache.org
Subject hadoop git commit: HDFS-10618. TestPendingReconstruction#testPendingAndInvalidate is flaky due to race condition. Contributed by Eric Badger.
Date Mon, 12 Mar 2018 19:23:32 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 457895d50 -> 88c749a90


HDFS-10618. TestPendingReconstruction#testPendingAndInvalidate is flaky due to race condition.
Contributed by Eric Badger.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/88c749a9
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/88c749a9
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/88c749a9

Branch: refs/heads/branch-2
Commit: 88c749a9036eef0bb03f6e279c34d1d485fe91e3
Parents: 457895d
Author: Anu Engineer <aengineer@apache.org>
Authored: Mon Mar 12 12:14:21 2018 -0700
Committer: Anu Engineer <aengineer@apache.org>
Committed: Mon Mar 12 12:14:21 2018 -0700

----------------------------------------------------------------------
 .../server/blockmanagement/TestPendingReplication.java    | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/88c749a9/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestPendingReplication.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestPendingReplication.java
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestPendingReplication.java
index dfb404f..f5cb689 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestPendingReplication.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestPendingReplication.java
@@ -457,14 +457,14 @@ public class TestPendingReplication {
             "STORAGE_ID", "TEST");
         bm.findAndMarkBlockAsCorrupt(block.getBlock(), block.getLocations()[1],
             "STORAGE_ID", "TEST");
+        BlockManagerTestUtil.computeAllPendingWork(bm);
+        BlockManagerTestUtil.updateState(bm);
+        assertEquals(bm.getPendingReplicationBlocksCount(), 1L);
+        BlockInfo storedBlock = bm.getStoredBlock(block.getBlock().getLocalBlock());
+        assertEquals(bm.pendingReplications.getNumReplicas(storedBlock), 2);
       } finally {
         cluster.getNamesystem().writeUnlock();
       }
-      BlockManagerTestUtil.computeAllPendingWork(bm);
-      BlockManagerTestUtil.updateState(bm);
-      assertEquals(bm.getPendingReplicationBlocksCount(), 1L);
-      BlockInfo storedBlock = bm.getStoredBlock(block.getBlock().getLocalBlock());
-      assertEquals(bm.pendingReplications.getNumReplicas(storedBlock), 2);
 
       // 4. delete the file
       fs.delete(filePath, true);


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


Mime
View raw message