HDFS-8595. TestCommitBlockSynchronization fails in branch-2.7. (Patch applies to all branches). (Contributed by Arpit Agarwal)

This commit is contained in:
Arpit Agarwal 2015-06-14 16:24:30 -07:00
parent cd578fa289
commit d07f3804b0
2 changed files with 4 additions and 0 deletions

View File

@ -668,6 +668,9 @@ Release 2.7.1 - UNRELEASED
HDFS-8596. TestDistributedFileSystem et al tests are broken in branch-2 HDFS-8596. TestDistributedFileSystem et al tests are broken in branch-2
due to incorrect setting of "datanode" attribute. (Yongjun Zhang) due to incorrect setting of "datanode" attribute. (Yongjun Zhang)
HDFS-8595. TestCommitBlockSynchronization fails in branch-2.7. (Patch
applies to all branches). (Arpit Agarwal)
Release 2.7.0 - 2015-04-20 Release 2.7.0 - 2015-04-20
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -78,6 +78,7 @@ public class TestCommitBlockSynchronization {
blockInfo.initializeBlockRecovery(genStamp); blockInfo.initializeBlockRecovery(genStamp);
doReturn(blockInfo).when(file).removeLastBlock(any(Block.class)); doReturn(blockInfo).when(file).removeLastBlock(any(Block.class));
doReturn(true).when(file).isUnderConstruction(); doReturn(true).when(file).isUnderConstruction();
doReturn(new BlockInfoContiguous[1]).when(file).getBlocks();
doReturn(blockInfo).when(namesystemSpy).getStoredBlock(any(Block.class)); doReturn(blockInfo).when(namesystemSpy).getStoredBlock(any(Block.class));
doReturn(blockInfo).when(file).getLastBlock(); doReturn(blockInfo).when(file).getLastBlock();