diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockManager.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockManager.java index 3088b7b6e4..6b1a9795de 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockManager.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockManager.java @@ -1219,7 +1219,7 @@ public void run() { } } - @Test + @Test(timeout = 60000) public void testBlockManagerMachinesArray() throws Exception { final Configuration conf = new HdfsConfiguration(); final MiniDFSCluster cluster = @@ -1230,6 +1230,8 @@ public void testBlockManagerMachinesArray() throws Exception { final Path filePath = new Path("/tmp.txt"); final long fileLen = 1L; DFSTestUtil.createFile(fs, filePath, fileLen, (short) 3, 1L); + DFSTestUtil.waitForReplication((DistributedFileSystem)fs, + filePath, (short) 3, 60000); ArrayList datanodes = cluster.getDataNodes(); assertEquals(datanodes.size(), 4); FSNamesystem ns = cluster.getNamesystem();