From fd3003d63bf0fb6192d93bcdde5204279be18f61 Mon Sep 17 00:00:00 2001 From: cnauroth Date: Tue, 23 Sep 2014 14:35:33 -0700 Subject: [PATCH] HDFS-7130. TestDataTransferKeepalive fails intermittently on Windows. Contributed by Chris Nauroth. (cherry picked from commit b93d9603a25b6b93f67c69503130164eef047876) --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ .../org/apache/hadoop/hdfs/TestDataTransferKeepalive.java | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 537e37f8f92..a9bb227a3f3 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -590,6 +590,9 @@ Release 2.6.0 - UNRELEASED HDFS-7115. TestEncryptionZonesWithHA assumes Unix path separator for KMS key store path. (Xiaoyu Yao via cnauroth) + HDFS-7130. TestDataTransferKeepalive fails intermittently on Windows. + (cnauroth) + Release 2.5.1 - 2014-09-05 INCOMPATIBLE CHANGES diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDataTransferKeepalive.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDataTransferKeepalive.java index 003e6be273b..eae8ea7681b 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDataTransferKeepalive.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDataTransferKeepalive.java @@ -105,7 +105,7 @@ public class TestDataTransferKeepalive { // Sleep for a bit longer than the keepalive timeout // and make sure the xceiver died. - Thread.sleep(DFS_DATANODE_SOCKET_REUSE_KEEPALIVE_DEFAULT + 1); + Thread.sleep(DFS_DATANODE_SOCKET_REUSE_KEEPALIVE_DEFAULT + 50); assertXceiverCount(0); // The socket is still in the cache, because we don't @@ -149,7 +149,7 @@ public class TestDataTransferKeepalive { assertXceiverCount(1); // Sleep for a bit longer than the client keepalive timeout. - Thread.sleep(CLIENT_EXPIRY_MS + 1); + Thread.sleep(CLIENT_EXPIRY_MS + 50); // Taking out a peer which is expired should give a null. Peer peer = peerCache.get(dn.getDatanodeId(), false);