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 yj...@apache.org on 2015/12/12 06:18:24 UTC
hadoop git commit: HDFS-8785. TestDistributedFileSystem is failing in
trunk. Contributed by Xiaoyu Yao.
Repository: hadoop
Updated Branches:
refs/heads/branch-2 5b1e1dfb3 -> 08616b365
HDFS-8785. TestDistributedFileSystem is failing in trunk. Contributed by Xiaoyu Yao.
(cherry picked from commit 2196e39e142b0f8d1944805db2bfacd4e3244625)
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/08616b36
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/08616b36
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/08616b36
Branch: refs/heads/branch-2
Commit: 08616b3654d400c02d75bd08cd836d6a441df750
Parents: 5b1e1df
Author: Xiaoyu Yao <xy...@apache.org>
Authored: Mon Jul 27 07:28:41 2015 -0700
Committer: Yongjun Zhang <yz...@cloudera.com>
Committed: Fri Dec 11 20:56:12 2015 -0800
----------------------------------------------------------------------
hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 2 ++
.../apache/hadoop/hdfs/TestDistributedFileSystem.java | 13 ++++++++-----
2 files changed, 10 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/08616b36/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 99f268a..5ff4568 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -1630,6 +1630,8 @@ Release 2.7.3 - UNRELEASED
HDFS-9383. TestByteArrayManager#testByteArrayManager fails.
(szetszwo via kihwal)
+ HDFS-8785. TestDistributedFileSystem is failing in trunk. (Xiaoyu Yao)
+
Release 2.7.2 - UNRELEASED
INCOMPATIBLE CHANGES
http://git-wip-us.apache.org/repos/asf/hadoop/blob/08616b36/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDistributedFileSystem.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDistributedFileSystem.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDistributedFileSystem.java
index 30bf438..be03902 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDistributedFileSystem.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDistributedFileSystem.java
@@ -1131,19 +1131,22 @@ public class TestDistributedFileSystem {
try {
cluster.waitActive();
DistributedFileSystem dfs = cluster.getFileSystem();
- // Write 1 MB to a dummy socket to ensure the write times out
+ // Write 10 MB to a dummy socket to ensure the write times out
ServerSocket socket = new ServerSocket(0);
Peer peer = dfs.getClient().newConnectedPeer(
(InetSocketAddress) socket.getLocalSocketAddress(), null, null);
long start = Time.now();
try {
- byte[] buf = new byte[1024 * 1024];
+ byte[] buf = new byte[10 * 1024 * 1024];
peer.getOutputStream().write(buf);
- Assert.fail("write should timeout");
+ long delta = Time.now() - start;
+ Assert.fail("write finish in " + delta + " ms" + "but should timedout");
} catch (SocketTimeoutException ste) {
long delta = Time.now() - start;
- Assert.assertTrue("write timedout too soon", delta >= timeout * 0.9);
- Assert.assertTrue("write timedout too late", delta <= timeout * 1.1);
+ Assert.assertTrue("write timedout too soon in " + delta + " ms",
+ delta >= timeout * 0.9);
+ Assert.assertTrue("write timedout too late in " + delta + " ms",
+ delta <= timeout * 1.2);
} catch (Throwable t) {
Assert.fail("wrong exception:" + t);
}