Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,6 @@ public static void setup() throws Exception {
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
Expand Down Expand Up @@ -307,6 +305,8 @@ public void testNfsRenameMultiNN() throws Exception {

@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 =
Expand All @@ -316,6 +316,8 @@ public void testNfsRenameSingleNN() throws Exception {
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);

Expand Down