Skip to content

Commit 63a7ed0

Browse files
committed
HADOOP-18508. review comments
Change-Id: I48fc6b30ba69a616fae688c45dffacc5da504014
1 parent aaf0c32 commit 63a7ed0

File tree

5 files changed

+6
-30
lines changed

5 files changed

+6
-30
lines changed

hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FSMainOperationsBaseTest.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,9 @@ public void setUp() throws Exception {
102102

103103
@After
104104
public void tearDown() throws Exception {
105-
fSys.delete(new Path(getAbsoluteTestRootPath(fSys), new Path("test")), true);
105+
if (fSys != null) {
106+
fSys.delete(new Path(getAbsoluteTestRootPath(fSys), new Path("test")), true);
107+
}
106108
}
107109

108110

@@ -192,7 +194,7 @@ public void testWorkingDirectory() throws Exception {
192194

193195
@Test
194196
public void testWDAbsolute() throws IOException {
195-
Path absoluteDir = new Path(fSys.getUri() + "/test/existingDir");
197+
Path absoluteDir = getTestRootPath(fSys, "test/existingDir");
196198
fSys.mkdirs(absoluteDir);
197199
fSys.setWorkingDirectory(absoluteDir);
198200
Assert.assertEquals(absoluteDir, fSys.getWorkingDirectory());

hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFSMainOperationsLocalFileSystem.java

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,5 @@ protected Path getDefaultWorkingDirectory() throws IOException {
5252
public void tearDown() throws Exception {
5353
super.tearDown();
5454
}
55-
56-
@Test
57-
@Override
58-
public void testWDAbsolute() throws IOException {
59-
Path absoluteDir = getTestRootPath(fSys, "test/existingDir");
60-
fSys.mkdirs(absoluteDir);
61-
fSys.setWorkingDirectory(absoluteDir);
62-
Assert.assertEquals(absoluteDir, fSys.getWorkingDirectory());
63-
}
55+
6456
}

hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestFSMainOperationsLocalFileSystem.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,5 @@ public void tearDown() throws Exception {
5353
super.tearDown();
5454
ViewFileSystemTestSetup.tearDown(this, fcTarget);
5555
}
56-
57-
@Test
58-
@Override
59-
public void testWDAbsolute() throws IOException {
60-
Path absoluteDir = getTestRootPath(fSys, "test/existingDir");
61-
fSys.mkdirs(absoluteDir);
62-
fSys.setWorkingDirectory(absoluteDir);
63-
Assert.assertEquals(absoluteDir, fSys.getWorkingDirectory());
6456

65-
}
6657
}

hadoop-tools/hadoop-aws/src/site/markdown/tools/hadoop-aws/testing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ is a more specific lie and harder to make. And, if you get caught out: you
4343
lose all credibility with the project.
4444

4545
You don't need to test from a VM within the AWS infrastructure; with the
46-
`-Dparallel=tests` option the non-scale tests complete in under twenty minutes.
46+
`-Dparallel-tests` option the non-scale tests complete in under twenty minutes.
4747
Because the tests clean up after themselves, they are also designed to be low
4848
cost. It's neither hard nor expensive to run the tests; if you can't,
4949
there's no guarantee your patch works. The reviewers have enough to do, and

hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3AFSMainOperations.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,6 @@ public void tearDown() throws Exception {
6060
}
6161
}
6262

63-
@Test
64-
@Override
65-
public void testWDAbsolute() throws IOException {
66-
Path absoluteDir = getTestRootPath(fSys, "test/existingDir");
67-
fSys.mkdirs(absoluteDir);
68-
fSys.setWorkingDirectory(absoluteDir);
69-
Assert.assertEquals(absoluteDir, fSys.getWorkingDirectory());
70-
}
71-
7263
@Override
7364
@Ignore("Permissions not supported")
7465
public void testListStatusThrowsExceptionForUnreadableDir() {

0 commit comments

Comments
 (0)