|
@@ -178,35 +178,35 @@ public abstract class FileContextMainOperationsBaseTest {
|
|
@Test
|
|
@Test
|
|
public void testMkdirs() throws Exception {
|
|
public void testMkdirs() throws Exception {
|
|
Path testDir = getTestRootPath(fc, "test/hadoop");
|
|
Path testDir = getTestRootPath(fc, "test/hadoop");
|
|
- Assert.assertFalse(fc.exists(testDir));
|
|
|
|
- Assert.assertFalse(fc.isFile(testDir));
|
|
|
|
|
|
+ Assert.assertFalse(exists(fc, testDir));
|
|
|
|
+ Assert.assertFalse(isFile(fc, testDir));
|
|
|
|
|
|
fc.mkdir(testDir, FsPermission.getDefault(), true);
|
|
fc.mkdir(testDir, FsPermission.getDefault(), true);
|
|
|
|
|
|
- Assert.assertTrue(fc.exists(testDir));
|
|
|
|
- Assert.assertFalse(fc.isFile(testDir));
|
|
|
|
|
|
+ Assert.assertTrue(exists(fc, testDir));
|
|
|
|
+ Assert.assertFalse(isFile(fc, testDir));
|
|
|
|
|
|
fc.mkdir(testDir, FsPermission.getDefault(), true);
|
|
fc.mkdir(testDir, FsPermission.getDefault(), true);
|
|
|
|
|
|
- Assert.assertTrue(fc.exists(testDir));
|
|
|
|
- Assert.assertFalse(fc.isFile(testDir));
|
|
|
|
|
|
+ Assert.assertTrue(exists(fc, testDir));
|
|
|
|
+ Assert.assertFalse(isFile(fc, testDir));
|
|
|
|
|
|
Path parentDir = testDir.getParent();
|
|
Path parentDir = testDir.getParent();
|
|
- Assert.assertTrue(fc.exists(parentDir));
|
|
|
|
- Assert.assertFalse(fc.isFile(parentDir));
|
|
|
|
|
|
+ Assert.assertTrue(exists(fc, parentDir));
|
|
|
|
+ Assert.assertFalse(isFile(fc, parentDir));
|
|
|
|
|
|
Path grandparentDir = parentDir.getParent();
|
|
Path grandparentDir = parentDir.getParent();
|
|
- Assert.assertTrue(fc.exists(grandparentDir));
|
|
|
|
- Assert.assertFalse(fc.isFile(grandparentDir));
|
|
|
|
|
|
+ Assert.assertTrue(exists(fc, grandparentDir));
|
|
|
|
+ Assert.assertFalse(isFile(fc, grandparentDir));
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@Test
|
|
@Test
|
|
public void testMkdirsFailsForSubdirectoryOfExistingFile() throws Exception {
|
|
public void testMkdirsFailsForSubdirectoryOfExistingFile() throws Exception {
|
|
Path testDir = getTestRootPath(fc, "test/hadoop");
|
|
Path testDir = getTestRootPath(fc, "test/hadoop");
|
|
- Assert.assertFalse(fc.exists(testDir));
|
|
|
|
|
|
+ Assert.assertFalse(exists(fc, testDir));
|
|
fc.mkdir(testDir, FsPermission.getDefault(), true);
|
|
fc.mkdir(testDir, FsPermission.getDefault(), true);
|
|
- Assert.assertTrue(fc.exists(testDir));
|
|
|
|
|
|
+ Assert.assertTrue(exists(fc, testDir));
|
|
|
|
|
|
createFile(getTestRootPath(fc, "test/hadoop/file"));
|
|
createFile(getTestRootPath(fc, "test/hadoop/file"));
|
|
|
|
|
|
@@ -217,7 +217,7 @@ public abstract class FileContextMainOperationsBaseTest {
|
|
} catch (IOException e) {
|
|
} catch (IOException e) {
|
|
// expected
|
|
// expected
|
|
}
|
|
}
|
|
- Assert.assertFalse(fc.exists(testSubDir));
|
|
|
|
|
|
+ Assert.assertFalse(exists(fc, testSubDir));
|
|
|
|
|
|
Path testDeepSubDir = getTestRootPath(fc, "test/hadoop/file/deep/sub/dir");
|
|
Path testDeepSubDir = getTestRootPath(fc, "test/hadoop/file/deep/sub/dir");
|
|
try {
|
|
try {
|
|
@@ -226,7 +226,7 @@ public abstract class FileContextMainOperationsBaseTest {
|
|
} catch (IOException e) {
|
|
} catch (IOException e) {
|
|
// expected
|
|
// expected
|
|
}
|
|
}
|
|
- Assert.assertFalse(fc.exists(testDeepSubDir));
|
|
|
|
|
|
+ Assert.assertFalse(exists(fc, testDeepSubDir));
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@@ -257,7 +257,7 @@ public abstract class FileContextMainOperationsBaseTest {
|
|
getTestRootPath(fc, "test/hadoop/a"),
|
|
getTestRootPath(fc, "test/hadoop/a"),
|
|
getTestRootPath(fc, "test/hadoop/b"),
|
|
getTestRootPath(fc, "test/hadoop/b"),
|
|
getTestRootPath(fc, "test/hadoop/c/1"), };
|
|
getTestRootPath(fc, "test/hadoop/c/1"), };
|
|
- Assert.assertFalse(fc.exists(testDirs[0]));
|
|
|
|
|
|
+ Assert.assertFalse(exists(fc, testDirs[0]));
|
|
|
|
|
|
for (Path path : testDirs) {
|
|
for (Path path : testDirs) {
|
|
fc.mkdir(path, FsPermission.getDefault(), true);
|
|
fc.mkdir(path, FsPermission.getDefault(), true);
|
|
@@ -316,7 +316,7 @@ public abstract class FileContextMainOperationsBaseTest {
|
|
getTestRootPath(fc, TEST_DIR_AXA),
|
|
getTestRootPath(fc, TEST_DIR_AXA),
|
|
getTestRootPath(fc, TEST_DIR_AXX), };
|
|
getTestRootPath(fc, TEST_DIR_AXX), };
|
|
|
|
|
|
- if (fc.exists(testDirs[0]) == false) {
|
|
|
|
|
|
+ if (exists(fc, testDirs[0]) == false) {
|
|
for (Path path : testDirs) {
|
|
for (Path path : testDirs) {
|
|
fc.mkdir(path, FsPermission.getDefault(), true);
|
|
fc.mkdir(path, FsPermission.getDefault(), true);
|
|
}
|
|
}
|
|
@@ -336,7 +336,7 @@ public abstract class FileContextMainOperationsBaseTest {
|
|
getTestRootPath(fc, TEST_DIR_AXX),
|
|
getTestRootPath(fc, TEST_DIR_AXX),
|
|
getTestRootPath(fc, TEST_DIR_AAA2), };
|
|
getTestRootPath(fc, TEST_DIR_AAA2), };
|
|
|
|
|
|
- if (fc.exists(testDirs[0]) == false) {
|
|
|
|
|
|
+ if (exists(fc, testDirs[0]) == false) {
|
|
for (Path path : testDirs) {
|
|
for (Path path : testDirs) {
|
|
fc.mkdir(path, FsPermission.getDefault(), true);
|
|
fc.mkdir(path, FsPermission.getDefault(), true);
|
|
}
|
|
}
|
|
@@ -373,7 +373,7 @@ public abstract class FileContextMainOperationsBaseTest {
|
|
getTestRootPath(fc, TEST_DIR_AXX),
|
|
getTestRootPath(fc, TEST_DIR_AXX),
|
|
getTestRootPath(fc, TEST_DIR_AAA2), };
|
|
getTestRootPath(fc, TEST_DIR_AAA2), };
|
|
|
|
|
|
- if (fc.exists(testDirs[0]) == false) {
|
|
|
|
|
|
+ if (exists(fc, testDirs[0]) == false) {
|
|
for (Path path : testDirs) {
|
|
for (Path path : testDirs) {
|
|
fc.mkdir(path, FsPermission.getDefault(), true);
|
|
fc.mkdir(path, FsPermission.getDefault(), true);
|
|
}
|
|
}
|
|
@@ -393,7 +393,7 @@ public abstract class FileContextMainOperationsBaseTest {
|
|
getTestRootPath(fc, TEST_DIR_AXX),
|
|
getTestRootPath(fc, TEST_DIR_AXX),
|
|
getTestRootPath(fc, TEST_DIR_AAA2), };
|
|
getTestRootPath(fc, TEST_DIR_AAA2), };
|
|
|
|
|
|
- if (fc.exists(testDirs[0]) == false) {
|
|
|
|
|
|
+ if (exists(fc, testDirs[0]) == false) {
|
|
for (Path path : testDirs) {
|
|
for (Path path : testDirs) {
|
|
fc.mkdir(path, FsPermission.getDefault(), true);
|
|
fc.mkdir(path, FsPermission.getDefault(), true);
|
|
}
|
|
}
|
|
@@ -417,7 +417,7 @@ public abstract class FileContextMainOperationsBaseTest {
|
|
getTestRootPath(fc, TEST_DIR_AXX),
|
|
getTestRootPath(fc, TEST_DIR_AXX),
|
|
getTestRootPath(fc, TEST_DIR_AAA2), };
|
|
getTestRootPath(fc, TEST_DIR_AAA2), };
|
|
|
|
|
|
- if (fc.exists(testDirs[0]) == false) {
|
|
|
|
|
|
+ if (exists(fc, testDirs[0]) == false) {
|
|
for (Path path : testDirs) {
|
|
for (Path path : testDirs) {
|
|
fc.mkdir(path, FsPermission.getDefault(), true);
|
|
fc.mkdir(path, FsPermission.getDefault(), true);
|
|
}
|
|
}
|
|
@@ -442,7 +442,7 @@ public abstract class FileContextMainOperationsBaseTest {
|
|
getTestRootPath(fc, TEST_DIR_AXX),
|
|
getTestRootPath(fc, TEST_DIR_AXX),
|
|
getTestRootPath(fc, TEST_DIR_AAA2), };
|
|
getTestRootPath(fc, TEST_DIR_AAA2), };
|
|
|
|
|
|
- if (fc.exists(testDirs[0]) == false) {
|
|
|
|
|
|
+ if (exists(fc, testDirs[0]) == false) {
|
|
for (Path path : testDirs) {
|
|
for (Path path : testDirs) {
|
|
fc.mkdir(path, FsPermission.getDefault(), true);
|
|
fc.mkdir(path, FsPermission.getDefault(), true);
|
|
}
|
|
}
|
|
@@ -466,7 +466,7 @@ public abstract class FileContextMainOperationsBaseTest {
|
|
getTestRootPath(fc, TEST_DIR_AXX),
|
|
getTestRootPath(fc, TEST_DIR_AXX),
|
|
getTestRootPath(fc, TEST_DIR_AXX), };
|
|
getTestRootPath(fc, TEST_DIR_AXX), };
|
|
|
|
|
|
- if (fc.exists(testDirs[0]) == false) {
|
|
|
|
|
|
+ if (exists(fc, testDirs[0]) == false) {
|
|
for (Path path : testDirs) {
|
|
for (Path path : testDirs) {
|
|
fc.mkdir(path, FsPermission.getDefault(), true);
|
|
fc.mkdir(path, FsPermission.getDefault(), true);
|
|
}
|
|
}
|
|
@@ -488,7 +488,7 @@ public abstract class FileContextMainOperationsBaseTest {
|
|
getTestRootPath(fc, TEST_DIR_AXX),
|
|
getTestRootPath(fc, TEST_DIR_AXX),
|
|
getTestRootPath(fc, TEST_DIR_AXX), };
|
|
getTestRootPath(fc, TEST_DIR_AXX), };
|
|
|
|
|
|
- if (fc.exists(testDirs[0]) == false) {
|
|
|
|
|
|
+ if (exists(fc, testDirs[0]) == false) {
|
|
for (Path path : testDirs) {
|
|
for (Path path : testDirs) {
|
|
fc.mkdir(path, FsPermission.getDefault(), true);
|
|
fc.mkdir(path, FsPermission.getDefault(), true);
|
|
}
|
|
}
|
|
@@ -516,7 +516,7 @@ public abstract class FileContextMainOperationsBaseTest {
|
|
getTestRootPath(fc, TEST_DIR_AXX),
|
|
getTestRootPath(fc, TEST_DIR_AXX),
|
|
getTestRootPath(fc, TEST_DIR_AXX), };
|
|
getTestRootPath(fc, TEST_DIR_AXX), };
|
|
|
|
|
|
- if (fc.exists(testDirs[0]) == false) {
|
|
|
|
|
|
+ if (exists(fc, testDirs[0]) == false) {
|
|
for (Path path : testDirs) {
|
|
for (Path path : testDirs) {
|
|
fc.mkdir(path, FsPermission.getDefault(), true);
|
|
fc.mkdir(path, FsPermission.getDefault(), true);
|
|
}
|
|
}
|
|
@@ -544,7 +544,7 @@ public abstract class FileContextMainOperationsBaseTest {
|
|
getTestRootPath(fc, TEST_DIR_AXX),
|
|
getTestRootPath(fc, TEST_DIR_AXX),
|
|
getTestRootPath(fc, TEST_DIR_AXX), };
|
|
getTestRootPath(fc, TEST_DIR_AXX), };
|
|
|
|
|
|
- if (fc.exists(testDirs[0]) == false) {
|
|
|
|
|
|
+ if (exists(fc, testDirs[0]) == false) {
|
|
for (Path path : testDirs) {
|
|
for (Path path : testDirs) {
|
|
fc.mkdir(path, FsPermission.getDefault(), true);
|
|
fc.mkdir(path, FsPermission.getDefault(), true);
|
|
}
|
|
}
|
|
@@ -570,7 +570,7 @@ public abstract class FileContextMainOperationsBaseTest {
|
|
getTestRootPath(fc, TEST_DIR_AXX),
|
|
getTestRootPath(fc, TEST_DIR_AXX),
|
|
getTestRootPath(fc, TEST_DIR_AXX), };
|
|
getTestRootPath(fc, TEST_DIR_AXX), };
|
|
|
|
|
|
- if (fc.exists(testDirs[0]) == false) {
|
|
|
|
|
|
+ if (exists(fc, testDirs[0]) == false) {
|
|
for (Path path : testDirs) {
|
|
for (Path path : testDirs) {
|
|
fc.mkdir(path, FsPermission.getDefault(), true);
|
|
fc.mkdir(path, FsPermission.getDefault(), true);
|
|
}
|
|
}
|
|
@@ -592,7 +592,7 @@ public abstract class FileContextMainOperationsBaseTest {
|
|
getTestRootPath(fc, TEST_DIR_AXX),
|
|
getTestRootPath(fc, TEST_DIR_AXX),
|
|
getTestRootPath(fc, TEST_DIR_AXX), };
|
|
getTestRootPath(fc, TEST_DIR_AXX), };
|
|
|
|
|
|
- if (fc.exists(testDirs[0]) == false) {
|
|
|
|
|
|
+ if (exists(fc, testDirs[0]) == false) {
|
|
for (Path path : testDirs) {
|
|
for (Path path : testDirs) {
|
|
fc.mkdir(path, FsPermission.getDefault(), true);
|
|
fc.mkdir(path, FsPermission.getDefault(), true);
|
|
}
|
|
}
|
|
@@ -646,7 +646,7 @@ public abstract class FileContextMainOperationsBaseTest {
|
|
out.write(data, 0, len);
|
|
out.write(data, 0, len);
|
|
out.close();
|
|
out.close();
|
|
|
|
|
|
- Assert.assertTrue("Exists", fc.exists(path));
|
|
|
|
|
|
+ Assert.assertTrue("Exists", exists(fc, path));
|
|
Assert.assertEquals("Length", len, fc.getFileStatus(path).getLen());
|
|
Assert.assertEquals("Length", len, fc.getFileStatus(path).getLen());
|
|
|
|
|
|
FSDataInputStream in = fc.open(path);
|
|
FSDataInputStream in = fc.open(path);
|
|
@@ -661,7 +661,7 @@ public abstract class FileContextMainOperationsBaseTest {
|
|
|
|
|
|
Assert.assertTrue("Deleted", fc.delete(path, false));
|
|
Assert.assertTrue("Deleted", fc.delete(path, false));
|
|
|
|
|
|
- Assert.assertFalse("No longer exists", fc.exists(path));
|
|
|
|
|
|
+ Assert.assertFalse("No longer exists", exists(fc, path));
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@@ -673,7 +673,7 @@ public abstract class FileContextMainOperationsBaseTest {
|
|
|
|
|
|
createFile(path);
|
|
createFile(path);
|
|
|
|
|
|
- Assert.assertTrue("Exists", fc.exists(path));
|
|
|
|
|
|
+ Assert.assertTrue("Exists", exists(fc, path));
|
|
Assert.assertEquals("Length", data.length, fc.getFileStatus(path).getLen());
|
|
Assert.assertEquals("Length", data.length, fc.getFileStatus(path).getLen());
|
|
|
|
|
|
try {
|
|
try {
|
|
@@ -687,7 +687,7 @@ public abstract class FileContextMainOperationsBaseTest {
|
|
out.write(data, 0, data.length);
|
|
out.write(data, 0, data.length);
|
|
out.close();
|
|
out.close();
|
|
|
|
|
|
- Assert.assertTrue("Exists", fc.exists(path));
|
|
|
|
|
|
+ Assert.assertTrue("Exists", exists(fc, path));
|
|
Assert.assertEquals("Length", data.length, fc.getFileStatus(path).getLen());
|
|
Assert.assertEquals("Length", data.length, fc.getFileStatus(path).getLen());
|
|
|
|
|
|
}
|
|
}
|
|
@@ -695,18 +695,18 @@ public abstract class FileContextMainOperationsBaseTest {
|
|
@Test
|
|
@Test
|
|
public void testWriteInNonExistentDirectory() throws IOException {
|
|
public void testWriteInNonExistentDirectory() throws IOException {
|
|
Path path = getTestRootPath(fc, "test/hadoop/file");
|
|
Path path = getTestRootPath(fc, "test/hadoop/file");
|
|
- Assert.assertFalse("Parent doesn't exist", fc.exists(path.getParent()));
|
|
|
|
|
|
+ Assert.assertFalse("Parent doesn't exist", exists(fc, path.getParent()));
|
|
createFile(path);
|
|
createFile(path);
|
|
|
|
|
|
- Assert.assertTrue("Exists", fc.exists(path));
|
|
|
|
|
|
+ Assert.assertTrue("Exists", exists(fc, path));
|
|
Assert.assertEquals("Length", data.length, fc.getFileStatus(path).getLen());
|
|
Assert.assertEquals("Length", data.length, fc.getFileStatus(path).getLen());
|
|
- Assert.assertTrue("Parent exists", fc.exists(path.getParent()));
|
|
|
|
|
|
+ Assert.assertTrue("Parent exists", exists(fc, path.getParent()));
|
|
}
|
|
}
|
|
|
|
|
|
@Test
|
|
@Test
|
|
public void testDeleteNonExistentFile() throws IOException {
|
|
public void testDeleteNonExistentFile() throws IOException {
|
|
Path path = getTestRootPath(fc, "test/hadoop/file");
|
|
Path path = getTestRootPath(fc, "test/hadoop/file");
|
|
- Assert.assertFalse("Doesn't exist", fc.exists(path));
|
|
|
|
|
|
+ Assert.assertFalse("Doesn't exist", exists(fc, path));
|
|
Assert.assertFalse("No deletion", fc.delete(path, true));
|
|
Assert.assertFalse("No deletion", fc.delete(path, true));
|
|
}
|
|
}
|
|
|
|
|
|
@@ -719,9 +719,9 @@ public abstract class FileContextMainOperationsBaseTest {
|
|
createFile(file);
|
|
createFile(file);
|
|
fc.mkdir(subdir,FsPermission.getDefault(), true);
|
|
fc.mkdir(subdir,FsPermission.getDefault(), true);
|
|
|
|
|
|
- Assert.assertTrue("File exists", fc.exists(file));
|
|
|
|
- Assert.assertTrue("Dir exists", fc.exists(dir));
|
|
|
|
- Assert.assertTrue("Subdir exists", fc.exists(subdir));
|
|
|
|
|
|
+ Assert.assertTrue("File exists", exists(fc, file));
|
|
|
|
+ Assert.assertTrue("Dir exists", exists(fc, dir));
|
|
|
|
+ Assert.assertTrue("Subdir exists", exists(fc, subdir));
|
|
|
|
|
|
try {
|
|
try {
|
|
fc.delete(dir, false);
|
|
fc.delete(dir, false);
|
|
@@ -729,23 +729,23 @@ public abstract class FileContextMainOperationsBaseTest {
|
|
} catch (IOException e) {
|
|
} catch (IOException e) {
|
|
// expected
|
|
// expected
|
|
}
|
|
}
|
|
- Assert.assertTrue("File still exists", fc.exists(file));
|
|
|
|
- Assert.assertTrue("Dir still exists", fc.exists(dir));
|
|
|
|
- Assert.assertTrue("Subdir still exists", fc.exists(subdir));
|
|
|
|
|
|
+ Assert.assertTrue("File still exists", exists(fc, file));
|
|
|
|
+ Assert.assertTrue("Dir still exists", exists(fc, dir));
|
|
|
|
+ Assert.assertTrue("Subdir still exists", exists(fc, subdir));
|
|
|
|
|
|
Assert.assertTrue("Deleted", fc.delete(dir, true));
|
|
Assert.assertTrue("Deleted", fc.delete(dir, true));
|
|
- Assert.assertFalse("File doesn't exist", fc.exists(file));
|
|
|
|
- Assert.assertFalse("Dir doesn't exist", fc.exists(dir));
|
|
|
|
- Assert.assertFalse("Subdir doesn't exist", fc.exists(subdir));
|
|
|
|
|
|
+ Assert.assertFalse("File doesn't exist", exists(fc, file));
|
|
|
|
+ Assert.assertFalse("Dir doesn't exist", exists(fc, dir));
|
|
|
|
+ Assert.assertFalse("Subdir doesn't exist", exists(fc, subdir));
|
|
}
|
|
}
|
|
|
|
|
|
@Test
|
|
@Test
|
|
public void testDeleteEmptyDirectory() throws IOException {
|
|
public void testDeleteEmptyDirectory() throws IOException {
|
|
Path dir = getTestRootPath(fc, "test/hadoop");
|
|
Path dir = getTestRootPath(fc, "test/hadoop");
|
|
fc.mkdir(dir, FsPermission.getDefault(), true);
|
|
fc.mkdir(dir, FsPermission.getDefault(), true);
|
|
- Assert.assertTrue("Dir exists", fc.exists(dir));
|
|
|
|
|
|
+ Assert.assertTrue("Dir exists", exists(fc, dir));
|
|
Assert.assertTrue("Deleted", fc.delete(dir, false));
|
|
Assert.assertTrue("Deleted", fc.delete(dir, false));
|
|
- Assert.assertFalse("Dir doesn't exist", fc.exists(dir));
|
|
|
|
|
|
+ Assert.assertFalse("Dir doesn't exist", exists(fc, dir));
|
|
}
|
|
}
|
|
|
|
|
|
@Test
|
|
@Test
|
|
@@ -952,13 +952,13 @@ public abstract class FileContextMainOperationsBaseTest {
|
|
|
|
|
|
rename(src, dst, true, false, true, options);
|
|
rename(src, dst, true, false, true, options);
|
|
Assert.assertFalse("Nested file1 exists",
|
|
Assert.assertFalse("Nested file1 exists",
|
|
- fc.exists(getTestRootPath(fc, "test/hadoop/dir/file1")));
|
|
|
|
|
|
+ exists(fc, getTestRootPath(fc, "test/hadoop/dir/file1")));
|
|
Assert.assertFalse("Nested file2 exists",
|
|
Assert.assertFalse("Nested file2 exists",
|
|
- fc.exists(getTestRootPath(fc, "test/hadoop/dir/subdir/file2")));
|
|
|
|
- Assert.assertTrue("Renamed nested file1 exists", fc
|
|
|
|
- .exists(getTestRootPath(fc, "test/new/newdir/file1")));
|
|
|
|
|
|
+ exists(fc, getTestRootPath(fc, "test/hadoop/dir/subdir/file2")));
|
|
|
|
+ Assert.assertTrue("Renamed nested file1 exists",
|
|
|
|
+ exists(fc, getTestRootPath(fc, "test/new/newdir/file1")));
|
|
Assert.assertTrue("Renamed nested exists",
|
|
Assert.assertTrue("Renamed nested exists",
|
|
- fc.exists(getTestRootPath(fc, "test/new/newdir/subdir/file2")));
|
|
|
|
|
|
+ exists(fc, getTestRootPath(fc, "test/new/newdir/subdir/file2")));
|
|
}
|
|
}
|
|
|
|
|
|
@Test
|
|
@Test
|
|
@@ -1098,8 +1098,8 @@ public abstract class FileContextMainOperationsBaseTest {
|
|
fc.rename(src, dst, options);
|
|
fc.rename(src, dst, options);
|
|
if (!renameShouldSucceed)
|
|
if (!renameShouldSucceed)
|
|
Assert.fail("rename should have thrown exception");
|
|
Assert.fail("rename should have thrown exception");
|
|
- Assert.assertEquals("Source exists", srcExists, fc.exists(src));
|
|
|
|
- Assert.assertEquals("Destination exists", dstExists, fc.exists(dst));
|
|
|
|
|
|
+ Assert.assertEquals("Source exists", srcExists, exists(fc, src));
|
|
|
|
+ Assert.assertEquals("Destination exists", dstExists, exists(fc, dst));
|
|
}
|
|
}
|
|
private boolean containsPath(Path path, FileStatus[] filteredPaths)
|
|
private boolean containsPath(Path path, FileStatus[] filteredPaths)
|
|
throws IOException {
|
|
throws IOException {
|