HDFS-16913. Fix flaky some unit tests since they offen timeout (#5377)
Co-authored-by: gf13871 <gf13871@ly.com> Reviewed-by: Tao Li <tomscut@apache.org> Reviewed-by: Shilun Fan <slfan1989@apache.org> Signed-off-by: Shilun Fan <slfan1989@apache.org>
This commit is contained in:
parent
1def35d802
commit
fe0541b58d
|
@ -32,7 +32,7 @@ public class TestFileLengthOnClusterRestart {
|
|||
* Tests the fileLength when we sync the file and restart the cluster and
|
||||
* Datanodes not report to Namenode yet.
|
||||
*/
|
||||
@Test(timeout = 60000)
|
||||
@Test(timeout = 120000)
|
||||
public void testFileLengthWithHSyncAndClusterRestartWithOutDNsRegister()
|
||||
throws Exception {
|
||||
final Configuration conf = new HdfsConfiguration();
|
||||
|
|
|
@ -493,17 +493,17 @@ public class TestLeaseRecovery2 {
|
|||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
@Test(timeout = 30000)
|
||||
@Test(timeout = 60000)
|
||||
public void testHardLeaseRecoveryAfterNameNodeRestart() throws Exception {
|
||||
hardLeaseRecoveryRestartHelper(false, -1);
|
||||
}
|
||||
|
||||
@Test(timeout = 30000)
|
||||
@Test(timeout = 60000)
|
||||
public void testHardLeaseRecoveryAfterNameNodeRestart2() throws Exception {
|
||||
hardLeaseRecoveryRestartHelper(false, 1535);
|
||||
}
|
||||
|
||||
@Test(timeout = 30000)
|
||||
@Test(timeout = 60000)
|
||||
public void testHardLeaseRecoveryWithRenameAfterNameNodeRestart()
|
||||
throws Exception {
|
||||
hardLeaseRecoveryRestartHelper(true, -1);
|
||||
|
|
|
@ -168,7 +168,7 @@ public class TestBalancerService {
|
|||
}
|
||||
}
|
||||
|
||||
@Test(timeout = 60000)
|
||||
@Test(timeout = 120000)
|
||||
public void testBalancerServiceOnError() throws Exception {
|
||||
Configuration conf = new HdfsConfiguration();
|
||||
// retry for every 5 seconds
|
||||
|
|
|
@ -210,7 +210,7 @@ public class TestPipelinesFailover {
|
|||
doTestWriteOverFailoverWithDnFail(TestScenario.GRACEFUL_FAILOVER);
|
||||
}
|
||||
|
||||
@Test(timeout=30000)
|
||||
@Test(timeout=60000)
|
||||
public void testWriteOverCrashFailoverWithDnFail() throws Exception {
|
||||
doTestWriteOverFailoverWithDnFail(TestScenario.ORIGINAL_ACTIVE_CRASHED);
|
||||
}
|
||||
|
|
|
@ -548,7 +548,7 @@ public class TestSnapshot {
|
|||
* paths work and the NN can load the resulting edits. This test if for
|
||||
* snapshots at the root level.
|
||||
*/
|
||||
@Test(timeout = 60000)
|
||||
@Test(timeout = 120000)
|
||||
public void testSnapshotOpsOnRootReservedPath() throws Exception {
|
||||
Path dir = new Path("/");
|
||||
Path sub = new Path(dir, "sub");
|
||||
|
|
Loading…
Reference in New Issue