diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestReplicationPolicy.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestReplicationPolicy.java index ddbf7fc0ce..e4834d658c 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestReplicationPolicy.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestReplicationPolicy.java @@ -1232,7 +1232,8 @@ public void testAddStoredBlockDoesNotCauseSkippedReplication() when(storage.getState()).thenReturn(DatanodeStorage.State.NORMAL); when(storage.getDatanodeDescriptor()).thenReturn(dn); when(storage.removeBlock(any(BlockInfo.class))).thenReturn(true); - when(storage.addBlock(any(BlockInfo.class))).thenReturn(true); + when(storage.addBlock(any(BlockInfo.class))).thenReturn + (DatanodeStorageInfo.AddBlockResult.ADDED); ucBlock.addStorage(storage); when(mbc.setLastBlock((BlockInfo) any(), (DatanodeStorageInfo[]) any()))