HDFS-11818. TestBlockManager.testSufficientlyReplBlocksUsesNewRack fails intermittently. Contributed by Nathan Roberts
(cherry picked from commit aeca471ec13135064f9605174cd6daa120007b18)
This commit is contained in:
parent
dfa2657abf
commit
f42222a75b
@ -153,7 +153,6 @@ public void setupMockCluster() throws IOException {
|
||||
Mockito.when(haContext.getState()).thenReturn(haState);
|
||||
Mockito.when(haState.shouldPopulateReplQueues()).thenReturn(true);
|
||||
Mockito.when(fsn.getHAContext()).thenReturn(haContext);
|
||||
bm.setInitializedReplQueues(true);
|
||||
CacheManager cm = Mockito.mock(CacheManager.class);
|
||||
Mockito.doReturn(cm).when(fsn).getCacheManager();
|
||||
GSet<CachedBlock, CachedBlock> cb =
|
||||
@ -897,10 +896,12 @@ public void testUCBlockNotConsideredMissing() throws Exception {
|
||||
StorageReceivedDeletedBlocks srdb =
|
||||
new StorageReceivedDeletedBlocks(new DatanodeStorage(ds.getStorageID()),
|
||||
rdbiList.toArray(new ReceivedDeletedBlockInfo[rdbiList.size()]));
|
||||
bm.setInitializedReplQueues(true);
|
||||
bm.processIncrementalBlockReport(node, srdb);
|
||||
// Needed replications should still be 0.
|
||||
assertEquals("UC block was incorrectly added to needed Replications",
|
||||
0, bm.neededReplications.size());
|
||||
bm.setInitializedReplQueues(false);
|
||||
}
|
||||
|
||||
private BlockInfo addBlockToBM(long blkId) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user