hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kih...@apache.org
Subject hadoop git commit: HDFS-8915. TestFSNamesystem.testFSLockGetWaiterCount fails intermittently. Contributed by Masatake Iwasaki.
Date Fri, 26 Aug 2016 15:10:48 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2.7 8aa18534d -> 8593225e8


HDFS-8915. TestFSNamesystem.testFSLockGetWaiterCount fails intermittently. Contributed by
Masatake Iwasaki.

(cherry picked from commit 13fb1b50e608558b2970184908ee5b9fcd7eb7b6)

Conflicts:
	hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFSNamesystem.java
Updated CHANGES.txt


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

Branch: refs/heads/branch-2.7
Commit: 8593225e85396ce88ed698adab135a470807647e
Parents: 8aa1853
Author: Kihwal Lee <kihwal@apache.org>
Authored: Fri Aug 26 10:07:55 2016 -0500
Committer: Kihwal Lee <kihwal@apache.org>
Committed: Fri Aug 26 10:09:57 2016 -0500

----------------------------------------------------------------------
 hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt           |  3 +++
 .../hadoop/hdfs/server/namenode/TestFSNamesystem.java | 14 ++++++++++++--
 2 files changed, 15 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/8593225e/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
index 06cb202..fe44e5b 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -26,6 +26,9 @@ Release 2.7.4 - UNRELEASED
     HDFS-9745. TestSecureNNWithQJM#testSecureMode sometimes fails with
     timeouts (Xiao Chen via jlowe)
 
+    HDFS-8915. TestFSNamesystem.testFSLockGetWaiterCount fails intermittently.
+    (Masatake Iwasaki via kihwal)
+
 Release 2.7.3 - UNRELEASED
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/8593225e/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFSNamesystem.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFSNamesystem.java
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFSNamesystem.java
index 5705922..51fa600 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFSNamesystem.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFSNamesystem.java
@@ -27,6 +27,7 @@ import java.io.IOException;
 import java.net.URI;
 import java.util.Collection;
 
+import com.google.common.base.Supplier;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileUtil;
 import org.apache.hadoop.hdfs.DFSTestUtil;
@@ -48,6 +49,7 @@ import org.mockito.internal.util.reflection.Whitebox;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
+import java.util.concurrent.TimeoutException;
 
 public class TestFSNamesystem {
 
@@ -241,8 +243,16 @@ public class TestFSNamesystem {
     }
 
     latch.await();
-    Assert.assertEquals("Expected number of blocked thread not found",
-                        threadCount, rwLock.getQueueLength());
+    try {
+      GenericTestUtils.waitFor(new Supplier<Boolean>() {
+        @Override
+        public Boolean get() {
+          return (threadCount == rwLock.getQueueLength());
+        }
+      }, 10, 1000);
+    } catch (TimeoutException e) {
+      fail("Expected number of blocked thread not found");
+    }
   }
 
   /**


---------------------------------------------------------------------
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