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 aa...@apache.org on 2021/12/08 11:52:28 UTC
[hadoop] branch branch-3.2 updated: HDFS-15862. Make TestViewfsWithNfs3.testNfsRenameSingleNN() idempotent (#2724)
This is an automated email from the ASF dual-hosted git repository.
aajisaka pushed a commit to branch branch-3.2
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/branch-3.2 by this push:
new 6114816 HDFS-15862. Make TestViewfsWithNfs3.testNfsRenameSingleNN() idempotent (#2724)
6114816 is described below
commit 6114816b033222b31300622c8d15feea96c2ce3a
Author: lzx404243 <lz...@hotmail.com>
AuthorDate: Wed Dec 8 05:44:18 2021 -0600
HDFS-15862. Make TestViewfsWithNfs3.testNfsRenameSingleNN() idempotent (#2724)
Signed-off-by: Akira Ajisaka <aa...@apache.org>
(cherry picked from commit 7ba91c123544e1c1cbee759a11879af3b19260b3)
---
.../java/org/apache/hadoop/hdfs/nfs/nfs3/TestViewfsWithNfs3.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/hadoop-hdfs-project/hadoop-hdfs-nfs/src/test/java/org/apache/hadoop/hdfs/nfs/nfs3/TestViewfsWithNfs3.java b/hadoop-hdfs-project/hadoop-hdfs-nfs/src/test/java/org/apache/hadoop/hdfs/nfs/nfs3/TestViewfsWithNfs3.java
index a5997b4..4899d9b 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-nfs/src/test/java/org/apache/hadoop/hdfs/nfs/nfs3/TestViewfsWithNfs3.java
+++ b/hadoop-hdfs-project/hadoop-hdfs-nfs/src/test/java/org/apache/hadoop/hdfs/nfs/nfs3/TestViewfsWithNfs3.java
@@ -154,8 +154,6 @@ public class TestViewfsWithNfs3 {
DFSTestUtil.createFile(viewFs, new Path("/hdfs2/write2"), 0, (short) 1, 0);
DFSTestUtil.createFile(viewFs, new Path("/hdfs1/renameMultiNN"),
0, (short) 1, 0);
- DFSTestUtil.createFile(viewFs, new Path("/hdfs1/renameSingleNN"),
- 0, (short) 1, 0);
}
@AfterClass
@@ -307,6 +305,8 @@ public class TestViewfsWithNfs3 {
@Test (timeout = 60000)
public void testNfsRenameSingleNN() throws Exception {
+ DFSTestUtil.createFile(viewFs, new Path("/hdfs1/renameSingleNN"),
+ 0, (short) 1, 0);
HdfsFileStatus fromFileStatus = nn1.getRpcServer().getFileInfo("/user1");
int fromNNId = Nfs3Utils.getNamenodeId(config, hdfs1.getUri());
FileHandle fromHandle =
@@ -316,6 +316,8 @@ public class TestViewfsWithNfs3 {
nn1.getRpcServer().getFileInfo("/user1/renameSingleNN");
Assert.assertEquals(statusBeforeRename.isDirectory(), false);
+ Path successFilePath = new Path("/user1/renameSingleNNSucess");
+ hdfs1.delete(successFilePath, false);
testNfsRename(fromHandle, "renameSingleNN",
fromHandle, "renameSingleNNSucess", Nfs3Status.NFS3_OK);
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org