diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestReconstructStripedFile.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestReconstructStripedFile.java index b24dfe31a7..c4c263a23e 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestReconstructStripedFile.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestReconstructStripedFile.java @@ -468,7 +468,7 @@ private void testNNSendsErasureCodingTasks(int deadDN) throws Exception { final int numDataNodes = dnNum + 1; conf.setInt( - DFSConfigKeys.DFS_NAMENODE_RECONSTRUCTION_PENDING_TIMEOUT_SEC_KEY, 10); + DFSConfigKeys.DFS_NAMENODE_RECONSTRUCTION_PENDING_TIMEOUT_SEC_KEY, 1); conf.setInt(DFSConfigKeys.DFS_NAMENODE_REPLICATION_MAX_STREAMS_KEY, 20); conf.setInt(DFSConfigKeys.DFS_DN_EC_RECONSTRUCTION_THREADS_KEY, 2); @@ -504,8 +504,9 @@ private void testNNSendsErasureCodingTasks(int deadDN) throws Exception { // Make sure that all pending reconstruction tasks can be processed. while (ns.getPendingReconstructionBlocks() > 0) { long timeoutPending = ns.getNumTimedOutPendingReconstructions(); - assertTrue(String.format("Found %d timeout pending reconstruction tasks", - timeoutPending), timeoutPending == 0); + assertEquals(String + .format("Found %d timeout pending reconstruction tasks", + timeoutPending), 0, timeoutPending); Thread.sleep(1000); }