Return-Path: X-Original-To: apmail-hadoop-common-commits-archive@www.apache.org Delivered-To: apmail-hadoop-common-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 33C1E18E4A for ; Mon, 14 Dec 2015 23:33:29 +0000 (UTC) Received: (qmail 67223 invoked by uid 500); 14 Dec 2015 23:33:29 -0000 Delivered-To: apmail-hadoop-common-commits-archive@hadoop.apache.org Received: (qmail 67149 invoked by uid 500); 14 Dec 2015 23:33:28 -0000 Mailing-List: contact common-commits-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-dev@hadoop.apache.org Delivered-To: mailing list common-commits@hadoop.apache.org Received: (qmail 67140 invoked by uid 99); 14 Dec 2015 23:33:28 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Dec 2015 23:33:28 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 9795BE09E6; Mon, 14 Dec 2015 23:33:28 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: yjzhangal@apache.org To: common-commits@hadoop.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: hadoop git commit: HDFS-8785. TestDistributedFileSystem is failing in trunk. Contributed by Xiaoyu Yao. Date: Mon, 14 Dec 2015 23:33:28 +0000 (UTC) Repository: hadoop Updated Branches: refs/heads/branch-2.8 bc7603e39 -> cdf43bb43 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/cdf43bb4 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/cdf43bb4 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/cdf43bb4 Branch: refs/heads/branch-2.8 Commit: cdf43bb438a1627db887ff0713d639dde1e24720 Parents: bc7603e Author: Xiaoyu Yao Authored: Mon Jul 27 07:28:41 2015 -0700 Committer: Yongjun Zhang Committed: Mon Dec 14 15:31:37 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/cdf43bb4/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 adc356f..0991c8f 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -1595,6 +1595,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/cdf43bb4/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); }