浏览代码

HDFS-9565. TestDistributedFileSystem.testLocatedFileStatusStorageIdsTypes is flaky due to race condition. (Contributed by Wei-Chiu Chuang)

Arpit Agarwal 9 年之前
父节点
当前提交
72a3f649e4

+ 3 - 0
hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt

@@ -2501,6 +2501,9 @@ Release 2.8.0 - UNRELEASED
 
 
     HDFS-9198. Coalesce IBR processing in the NN. (Daryn Sharp via umamahesh)
     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
 Release 2.7.3 - UNRELEASED
 
 
   INCOMPATIBLE CHANGES
   INCOMPATIBLE CHANGES

+ 1 - 0
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDistributedFileSystem.java

@@ -830,6 +830,7 @@ public class TestDistributedFileSystem {
       final int repl = 2;
       final int repl = 2;
       DFSTestUtil.createFile(fs, testFile, blockSize, numBlocks * blockSize,
       DFSTestUtil.createFile(fs, testFile, blockSize, numBlocks * blockSize,
           blockSize, (short) repl, 0xADDED);
           blockSize, (short) repl, 0xADDED);
+      DFSTestUtil.waitForReplication(fs, testFile, (short) repl, 30000);
       // Get the listing
       // Get the listing
       RemoteIterator<LocatedFileStatus> it = fs.listLocatedStatus(testFile);
       RemoteIterator<LocatedFileStatus> it = fs.listLocatedStatus(testFile);
       assertTrue("Expected file to be present", it.hasNext());
       assertTrue("Expected file to be present", it.hasNext());