HDFS-16609. Fix Flakes Junit Tests that often report timeouts. (#4382). Contributed by fanshilun.
This commit is contained in:
parent
02c21ef8c3
commit
170668b994
|
@ -1410,7 +1410,7 @@ public class TestDFSShell {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test (timeout = 30000)
|
@Test (timeout = 60000)
|
||||||
public void testFilePermissions() throws IOException {
|
public void testFilePermissions() throws IOException {
|
||||||
Configuration conf = new HdfsConfiguration();
|
Configuration conf = new HdfsConfiguration();
|
||||||
|
|
||||||
|
|
|
@ -273,7 +273,7 @@ public class TestFileCreation {
|
||||||
defaults.getDefaultStoragePolicyId());
|
defaults.getDefaultStoragePolicyId());
|
||||||
doReturn(newDefaults).when(spyNamesystem).getServerDefaults();
|
doReturn(newDefaults).when(spyNamesystem).getServerDefaults();
|
||||||
|
|
||||||
// Verify that the value is updated correctly. Wait for 3 seconds.
|
// Verify that the value is updated correctly. Wait for 6 seconds.
|
||||||
GenericTestUtils.waitFor(()->{
|
GenericTestUtils.waitFor(()->{
|
||||||
try {
|
try {
|
||||||
FsServerDefaults currDef = dfsClient.getServerDefaults();
|
FsServerDefaults currDef = dfsClient.getServerDefaults();
|
||||||
|
@ -282,7 +282,7 @@ public class TestFileCreation {
|
||||||
// do nothing;
|
// do nothing;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}, 1, 3000);
|
}, 1, 6000);
|
||||||
|
|
||||||
} finally {
|
} finally {
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
|
|
|
@ -1351,7 +1351,7 @@ public class TestExternalStoragePolicySatisfier {
|
||||||
* 4. Set policy and call satisfyStoragePolicy for file.
|
* 4. Set policy and call satisfyStoragePolicy for file.
|
||||||
* 5. Block should be moved successfully.
|
* 5. Block should be moved successfully.
|
||||||
*/
|
*/
|
||||||
@Test(timeout = 300000)
|
@Test(timeout = 600000)
|
||||||
public void testSPSWhenFileHasExcessRedundancyBlocks() throws Exception {
|
public void testSPSWhenFileHasExcessRedundancyBlocks() throws Exception {
|
||||||
try {
|
try {
|
||||||
config.set(DFSConfigKeys
|
config.set(DFSConfigKeys
|
||||||
|
|
Loading…
Reference in New Issue