You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by fe...@apache.org on 2021/10/26 06:54:33 UTC
[hadoop] branch trunk updated: HDFS-16281. Fix flaky unit tests
failed due to timeout (#3574)
This is an automated email from the ASF dual-hosted git repository.
ferhui pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/trunk by this push:
new c1a8285 HDFS-16281. Fix flaky unit tests failed due to timeout (#3574)
c1a8285 is described below
commit c1a82853635d384a83a03e0a43ee76ae423bfc77
Author: litao <to...@gmail.com>
AuthorDate: Tue Oct 26 14:54:11 2021 +0800
HDFS-16281. Fix flaky unit tests failed due to timeout (#3574)
---
...TestViewFileSystemOverloadSchemeHdfsFileSystemContract.java | 2 +-
.../viewfs/TestViewFileSystemOverloadSchemeWithHdfsScheme.java | 10 +++++-----
.../org/apache/hadoop/hdfs/TestHDFSFileSystemContract.java | 2 +-
.../test/java/org/apache/hadoop/hdfs/TestSnapshotCommands.java | 2 +-
.../server/diskbalancer/command/TestDiskBalancerCommand.java | 2 +-
.../hdfs/server/namenode/TestNamenodeStorageDirectives.java | 2 +-
.../apache/hadoop/hdfs/web/TestWebHdfsFileSystemContract.java | 2 +-
7 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFileSystemOverloadSchemeHdfsFileSystemContract.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFileSystemOverloadSchemeHdfsFileSystemContract.java
index dcfa051..3d0e705 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFileSystemOverloadSchemeHdfsFileSystemContract.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFileSystemOverloadSchemeHdfsFileSystemContract.java
@@ -103,7 +103,7 @@ public class TestViewFileSystemOverloadSchemeHdfsFileSystemContract
}
@Override
- @Test
+ @Test(timeout = 60000)
public void testAppend() throws IOException {
AppendTestUtil.testAppend(fs, new Path("/append/f"));
}
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFileSystemOverloadSchemeWithHdfsScheme.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFileSystemOverloadSchemeWithHdfsScheme.java
index 650a472..76eee6d 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFileSystemOverloadSchemeWithHdfsScheme.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFileSystemOverloadSchemeWithHdfsScheme.java
@@ -496,7 +496,7 @@ public class TestViewFileSystemOverloadSchemeWithHdfsScheme {
* When InnerCache disabled, all matching ViewFileSystemOverloadScheme
* initialized scheme file systems would not use FileSystem cache.
*/
- @Test(timeout = 3000)
+ @Test(timeout = 30000)
public void testViewFsOverloadSchemeWithNoInnerCacheAndHdfsTargets()
throws Exception {
final Path hdfsTargetPath = new Path(defaultFSURI + HDFS_USER_FOLDER);
@@ -523,7 +523,7 @@ public class TestViewFileSystemOverloadSchemeWithHdfsScheme {
* initialized scheme file systems should continue to take advantage of
* FileSystem cache.
*/
- @Test(timeout = 3000)
+ @Test(timeout = 30000)
public void testViewFsOverloadSchemeWithNoInnerCacheAndLocalSchemeTargets()
throws Exception {
final Path localTragetPath = new Path(localTargetDir.toURI());
@@ -545,7 +545,7 @@ public class TestViewFileSystemOverloadSchemeWithHdfsScheme {
/**
* Tests the rename with nfly mount link.
*/
- @Test(timeout = 3000)
+ @Test(timeout = 30000)
public void testNflyRename() throws Exception {
final Path hdfsTargetPath1 = new Path(defaultFSURI + HDFS_USER_FOLDER);
final Path hdfsTargetPath2 = new Path(defaultFSURI + HDFS_USER_FOLDER + 1);
@@ -577,7 +577,7 @@ public class TestViewFileSystemOverloadSchemeWithHdfsScheme {
/**
* Tests the write and read contents with nfly mount link.
*/
- @Test(timeout = 3000)
+ @Test(timeout = 30000)
public void testNflyWriteRead() throws Exception {
final Path hdfsTargetPath1 = new Path(defaultFSURI + HDFS_USER_FOLDER);
final Path hdfsTargetPath2 = new Path(defaultFSURI + HDFS_USER_FOLDER + 1);
@@ -604,7 +604,7 @@ public class TestViewFileSystemOverloadSchemeWithHdfsScheme {
* target file. 3. Tests the read works with repairOnRead flag. 4. Tests that
* previously deleted file fully recovered and exists.
*/
- @Test(timeout = 3000)
+ @Test(timeout = 30000)
public void testNflyRepair() throws Exception {
final NflyFSystem.NflyKey repairKey = NflyFSystem.NflyKey.repairOnRead;
final Path hdfsTargetPath1 = new Path(defaultFSURI + HDFS_USER_FOLDER);
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestHDFSFileSystemContract.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestHDFSFileSystemContract.java
index 6da46de..3a85289 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestHDFSFileSystemContract.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestHDFSFileSystemContract.java
@@ -63,7 +63,7 @@ public class TestHDFSFileSystemContract extends FileSystemContractBaseTest {
return defaultWorkingDirectory;
}
- @Test
+ @Test(timeout = 60000)
public void testAppend() throws IOException {
AppendTestUtil.testAppend(fs, new Path("/testAppend/f"));
}
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestSnapshotCommands.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestSnapshotCommands.java
index 32ac298..52bc12f 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestSnapshotCommands.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestSnapshotCommands.java
@@ -224,7 +224,7 @@ public class TestSnapshotCommands {
fs.delete(new Path("/Fully/QPath"), true);
}
- @Test (timeout=60000)
+ @Test (timeout=120000)
public void testSnapshotDiff()throws Exception {
Configuration config = new HdfsConfiguration();
Path snapDirPath = new Path(fs.getUri().toString() + "/snap_dir");
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/diskbalancer/command/TestDiskBalancerCommand.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/diskbalancer/command/TestDiskBalancerCommand.java
index 1d6331d..d0107b5 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/diskbalancer/command/TestDiskBalancerCommand.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/diskbalancer/command/TestDiskBalancerCommand.java
@@ -158,7 +158,7 @@ public class TestDiskBalancerCommand {
* Tests running multiple commands under on setup. This mainly covers
* {@link org.apache.hadoop.hdfs.server.diskbalancer.command.Command#close}
*/
- @Test(timeout = 60000)
+ @Test(timeout = 120000)
public void testRunMultipleCommandsUnderOneSetup() throws Exception {
final int numDatanodes = 1;
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNamenodeStorageDirectives.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNamenodeStorageDirectives.java
index 5bcb3a5..0469b91 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNamenodeStorageDirectives.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNamenodeStorageDirectives.java
@@ -192,7 +192,7 @@ public class TestNamenodeStorageDirectives {
* Types.
* @throws IOException
*/
- @Test(timeout=60000)
+ @Test(timeout=120000)
public void testTargetStorageTypes() throws ReconfigurationException,
InterruptedException, TimeoutException, IOException {
// DISK and not anything else.
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/web/TestWebHdfsFileSystemContract.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/web/TestWebHdfsFileSystemContract.java
index 722ebad..6821d9b 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/web/TestWebHdfsFileSystemContract.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/web/TestWebHdfsFileSystemContract.java
@@ -396,7 +396,7 @@ public class TestWebHdfsFileSystemContract extends FileSystemContractBaseTest {
}
}
- @Test
+ @Test(timeout = 60000)
public void testResponseCode() throws IOException {
final WebHdfsFileSystem webhdfs = (WebHdfsFileSystem)fs;
final Path root = new Path("/");
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org