From 0c1d1e311c5eb8929c33f1fe5fee3723a5708f85 Mon Sep 17 00:00:00 2001 From: Arpit Agarwal Date: Thu, 17 Dec 2015 10:36:07 -0800 Subject: [PATCH] HDFS-9565. TestDistributedFileSystem.testLocatedFileStatusStorageIdsTypes is flaky due to race condition. (Contributed by Wei-Chiu Chuang) --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ .../java/org/apache/hadoop/hdfs/TestDistributedFileSystem.java | 1 + 2 files changed, 4 insertions(+) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 268a5896bf1..d9c19f1b1af 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -1636,6 +1636,9 @@ Release 2.8.0 - UNRELEASED HDFS-9198. Coalesce IBR processing in the NN. (Daryn Sharp via umamahesh) + HDFS-9565. TestDistributedFileSystem.testLocatedFileStatusStorageIdsTypes + is flaky due to race condition. (Wei-Chiu Chuang via Arpit Agarwal) + Release 2.7.3 - UNRELEASED INCOMPATIBLE CHANGES 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 7620ed2a575..dfc3f3b152d 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 @@ -729,6 +729,7 @@ public class TestDistributedFileSystem { final int repl = 2; DFSTestUtil.createFile(fs, testFile, blockSize, numBlocks * blockSize, blockSize, (short) repl, 0xADDED); + DFSTestUtil.waitForReplication(fs, testFile, (short) repl, 30000); // Get the listing RemoteIterator it = fs.listLocatedStatus(testFile); assertTrue("Expected file to be present", it.hasNext());