HDFS-14144. TestPred fails in Trunk. Contributed by Ayush Saxena.

This commit is contained in:
Giovanni Matteo Fumarola 2018-12-12 11:16:16 -08:00
parent 76efeacd5f
commit 561b61cfb1
1 changed files with 1 additions and 2 deletions

View File

@ -676,11 +676,10 @@ public class TestPread {
Path p = new Path("/test");
String data = "testingmissingblock";
DFSTestUtil.writeFile(dfs, p, data);
DFSTestUtil.waitForReplication(dfs, p, (short) 2, 10000);
FSDataInputStream in = dfs.open(p);
List<LocatedBlock> blocks = DFSTestUtil.getAllBlocks(in);
LocatedBlock lb = blocks.get(0);
DFSTestUtil.waitForReplication(cluster, lb.getBlock(), 1, 2, 0);
blocks = DFSTestUtil.getAllBlocks(in);
DatanodeInfo[] locations = null;
for (LocatedBlock locatedBlock : blocks) {