verify that corrupt read_only_shared replicas are n't counted towards the corrupt replicas total . concode_field_sep Path PATH concode_elem_sep MiniDFSCluster cluster concode_elem_sep int RO_NODE_INDEX concode_elem_sep long seed concode_elem_sep int RETRIES concode_elem_sep short NUM_DATANODES concode_elem_sep ExtendedBlock extendedBlock concode_elem_sep Configuration conf concode_elem_sep BlockManager blockManager concode_elem_sep DistributedFileSystem fs concode_elem_sep DatanodeInfo readOnlyDataNode concode_elem_sep BlockInfo storedBlock concode_elem_sep int BLOCK_SIZE concode_elem_sep DatanodeInfo normalDataNode concode_elem_sep DFSClient client concode_elem_sep Block block concode_elem_sep Log LOG concode_elem_sep DatanodeManager datanodeManager concode_field_sep void validateStorageState concode_elem_sep void waitForLocations concode_elem_sep LocatedBlock getLocatedBlock concode_elem_sep void setup concode_elem_sep void tearDown concode_elem_sep void validateNumberReplicas concode_elem_sep void testNormalReplicaOffline concode_elem_sep void testReplicaCounting
void function ( ) { client . reportBadBlocks ( new LocatedBlock [ ] { new LocatedBlock ( extendedBlock , new DatanodeInfo [ ] { readOnlyDataNode } ) } ) ; waitForLocations ( 1 ) ; NumberReplicas loc0 = blockManager . countNodes ( storedBlock ) ; assertThat ( loc0 . corruptReplicas ( ) , is ( 0 ) ) ; }