Skip to content

Commit fe0541b

Browse files
HDFS-16913. Fix flaky some unit tests since they offen timeout (apache#5377)
Co-authored-by: gf13871 <[email protected]> Reviewed-by: Tao Li <[email protected]> Reviewed-by: Shilun Fan <[email protected]> Signed-off-by: Shilun Fan <[email protected]>
1 parent 1def35d commit fe0541b

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestFileLengthOnClusterRestart.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public class TestFileLengthOnClusterRestart {
3232
* Tests the fileLength when we sync the file and restart the cluster and
3333
* Datanodes not report to Namenode yet.
3434
*/
35-
@Test(timeout = 60000)
35+
@Test(timeout = 120000)
3636
public void testFileLengthWithHSyncAndClusterRestartWithOutDNsRegister()
3737
throws Exception {
3838
final Configuration conf = new HdfsConfiguration();

hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestLeaseRecovery2.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -493,17 +493,17 @@ public void testSoftLeaseRecovery() throws Exception {
493493
*
494494
* @throws Exception
495495
*/
496-
@Test(timeout = 30000)
496+
@Test(timeout = 60000)
497497
public void testHardLeaseRecoveryAfterNameNodeRestart() throws Exception {
498498
hardLeaseRecoveryRestartHelper(false, -1);
499499
}
500500

501-
@Test(timeout = 30000)
501+
@Test(timeout = 60000)
502502
public void testHardLeaseRecoveryAfterNameNodeRestart2() throws Exception {
503503
hardLeaseRecoveryRestartHelper(false, 1535);
504504
}
505505

506-
@Test(timeout = 30000)
506+
@Test(timeout = 60000)
507507
public void testHardLeaseRecoveryWithRenameAfterNameNodeRestart()
508508
throws Exception {
509509
hardLeaseRecoveryRestartHelper(true, -1);

hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/balancer/TestBalancerService.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ public void testBalancerServiceBalanceTwice() throws Exception {
168168
}
169169
}
170170

171-
@Test(timeout = 60000)
171+
@Test(timeout = 120000)
172172
public void testBalancerServiceOnError() throws Exception {
173173
Configuration conf = new HdfsConfiguration();
174174
// retry for every 5 seconds

hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestPipelinesFailover.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ public void testWriteOverGracefulFailoverWithDnFail() throws Exception {
210210
doTestWriteOverFailoverWithDnFail(TestScenario.GRACEFUL_FAILOVER);
211211
}
212212

213-
@Test(timeout=30000)
213+
@Test(timeout=60000)
214214
public void testWriteOverCrashFailoverWithDnFail() throws Exception {
215215
doTestWriteOverFailoverWithDnFail(TestScenario.ORIGINAL_ACTIVE_CRASHED);
216216
}

hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestSnapshot.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ public void testSnapshotOpsOnReservedPath() throws Exception {
548548
* paths work and the NN can load the resulting edits. This test if for
549549
* snapshots at the root level.
550550
*/
551-
@Test(timeout = 60000)
551+
@Test(timeout = 120000)
552552
public void testSnapshotOpsOnRootReservedPath() throws Exception {
553553
Path dir = new Path("/");
554554
Path sub = new Path(dir, "sub");

0 commit comments

Comments
 (0)