Skip to content
Open
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 @@ -77,6 +77,7 @@

@BeforeEach
public void setup() throws Exception {
prepareCleanTestRootDir();
config.set(MiniDFSCluster.HDFS_MINIDFS_BASEDIR, TEST_ROOT_DIR.toString());
HdfsConfiguration hdfsConfig = new HdfsConfiguration();
hdfsCluster = new MiniDFSCluster.Builder(hdfsConfig).numDataNodes(1).build();
Expand Down Expand Up @@ -106,7 +107,25 @@
jsonGenerator.close();
outStream.close();
outStreamDomain.close();

FileSystem hdfsFs = hdfsCluster.getFileSystem();
if (hdfsFs.exists(TEST_ROOT_DIR)) {
hdfsFs.delete(TEST_ROOT_DIR, true);
}
hdfsCluster.shutdown();

FileSystem localFs = FileSystem.getLocal(config);
if (localFs.exists(TEST_ROOT_DIR)) {
localFs.delete(TEST_ROOT_DIR, true);
}
}

Check failure on line 122 in hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timeline-pluginstorage/src/test/java/org/apache/hadoop/yarn/server/timeline/TestLogInfo.java

View check run for this annotation

ASF Cloudbees Jenkins ci-hadoop / Apache Yetus

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timeline-pluginstorage/src/test/java/org/apache/hadoop/yarn/server/timeline/TestLogInfo.java#L122

blanks: end of line
/**
* Creates a fresh test root directory after cleanup.
*/
private void prepareCleanTestRootDir() throws IOException {
FileSystem localFs = FileSystem.getLocal(config);
localFs.mkdirs(TEST_ROOT_DIR);
}

@Test
Expand Down Expand Up @@ -246,4 +265,4 @@
return fileContextTestHelper.getTestRootPath(fc, pathString);
}

}
}
Loading