HDFS-15940. Fix TestBlockRecovery2#testRaceBetweenReplicaRecoveryAndFinalizeBlock (ADDENDUM) (#2874)

(cherry picked from commit 56bd968fb4)
This commit is contained in:
Viraj Jasani 2021-04-09 07:40:18 +05:30 committed by Takanobu Asanuma
parent df99ac0399
commit 4994b73eeb

View File

@ -229,8 +229,8 @@ public void testRaceBetweenReplicaRecoveryAndFinalizeBlock()
tearDown();
Configuration configuration = new HdfsConfiguration();
configuration.set(
DFSConfigKeys.DFS_DATANODE_XCEIVER_STOP_TIMEOUT_MILLIS_KEY, "1000");
configuration.setLong(
DFSConfigKeys.DFS_DATANODE_XCEIVER_STOP_TIMEOUT_MILLIS_KEY, 5000L);
MiniDFSCluster cluster = new MiniDFSCluster.Builder(configuration)
.numDataNodes(1).build();
try {
@ -257,6 +257,7 @@ public void testRaceBetweenReplicaRecoveryAndFinalizeBlock()
dataNode.initReplicaRecovery(recoveringBlock);
}
} catch (Exception e) {
LOG.error("Something went wrong.", e);
recoveryInitResult.set(false);
}
});