HDFS-10748. TestFileTruncate#testTruncateWithDataNodesRestart runs sometimes timeout. Contributed by Yiqun Lin.
(cherry picked from commit 4da5000dd3
)
This commit is contained in:
parent
4037b22b7c
commit
fc67501393
|
@ -699,6 +699,9 @@ public class TestFileTruncate {
|
||||||
assertEquals(newBlock.getBlock().getGenerationStamp(),
|
assertEquals(newBlock.getBlock().getGenerationStamp(),
|
||||||
oldBlock.getBlock().getGenerationStamp() + 1);
|
oldBlock.getBlock().getGenerationStamp() + 1);
|
||||||
|
|
||||||
|
Thread.sleep(2000);
|
||||||
|
// trigger the second time BR to delete the corrupted replica if there's one
|
||||||
|
cluster.triggerBlockReports();
|
||||||
// Wait replicas come to 3
|
// Wait replicas come to 3
|
||||||
DFSTestUtil.waitReplication(fs, p, REPLICATION);
|
DFSTestUtil.waitReplication(fs, p, REPLICATION);
|
||||||
// Old replica is disregarded and replaced with the truncated one
|
// Old replica is disregarded and replaced with the truncated one
|
||||||
|
|
Loading…
Reference in New Issue