HDFS-10590: Fix TestReconstructStripedBlocks.testCountLiveReplicas test failures. Contributed by Rakesh R

This commit is contained in:
Uma Maheswara Rao G 2016-07-13 00:07:11 -07:00
parent 087290e6b1
commit 438b7c5935
2 changed files with 4 additions and 0 deletions

View File

@ -514,6 +514,8 @@ public class StripedFileTestUtil {
public static LocatedBlocks waitForReconstructionFinished(Path file,
DistributedFileSystem fs, int groupSize)
throws Exception {
LOG.info("Waiting for reconstruction to be finished for the file:" + file
+ ", groupSize:" + groupSize);
final int attempts = 60;
for (int i = 0; i < attempts; i++) {
LocatedBlocks locatedBlocks = getLocatedBlocks(file, fs);

View File

@ -303,6 +303,8 @@ public class TestReconstructStripedBlocks {
// check if NN can detect the missing internal block and finish the
// reconstruction
StripedFileTestUtil.waitForReconstructionFinished(filePath, fs,
GROUP_SIZE);
boolean reconstructed = false;
for (int i = 0; i < 5; i++) {
NumberReplicas num = null;