use of org.apache.ignite.igfs.IgfsPath in project ignite by apache.
the class IgfsDualAbstractSelfTest method testMoveRenameFileDestinationRootSourceMissingPartially.
/**
* Test file move and rename when destination is the root and source is missing partially.
*
* @throws Exception If failed.
*/
public void testMoveRenameFileDestinationRootSourceMissingPartially() throws Exception {
IgfsPath file = new IgfsPath("/" + FILE.name());
create(igfsSecondary, paths(DIR, SUBDIR), paths(FILE));
create(igfs, paths(DIR), null);
igfs.rename(FILE, file);
checkExist(igfs, SUBDIR);
checkExist(igfs, igfsSecondary, file);
checkNotExist(igfs, igfsSecondary, FILE);
}
use of org.apache.ignite.igfs.IgfsPath in project ignite by apache.
the class IgfsDualAbstractSelfTest method testMoveRenameDirectorySourceParentRootDestinationMissingPartially.
/**
* Test directory move and rename when source parent is the root and destination is missing partially.
*
* @throws Exception If failed.
*/
public void testMoveRenameDirectorySourceParentRootDestinationMissingPartially() throws Exception {
IgfsPath dir = new IgfsPath("/" + SUBSUBDIR_NEW.name());
create(igfsSecondary, paths(DIR_NEW, SUBDIR_NEW, dir), null);
create(igfs, paths(DIR_NEW), null);
igfs.rename(dir, SUBSUBDIR_NEW);
checkExist(igfs, SUBDIR_NEW);
checkExist(igfs, igfsSecondary, SUBSUBDIR_NEW);
checkNotExist(igfs, igfsSecondary, dir);
}
use of org.apache.ignite.igfs.IgfsPath in project ignite by apache.
the class IgfsDualAbstractSelfTest method testMoveRenameFileSourceParentRootDestinationMissing.
/**
* Test file move and rename when source parent is the root and destination is missing.
*
* @throws Exception If failed.
*/
public void testMoveRenameFileSourceParentRootDestinationMissing() throws Exception {
IgfsPath file = new IgfsPath("/" + FILE_NEW.name());
create(igfsSecondary, paths(DIR_NEW, SUBDIR_NEW), paths(file));
create(igfs, null, null);
igfs.rename(file, FILE_NEW);
checkExist(igfs, DIR_NEW, SUBDIR_NEW);
checkExist(igfs, igfsSecondary, FILE_NEW);
checkNotExist(igfs, igfsSecondary, file);
}
use of org.apache.ignite.igfs.IgfsPath in project ignite by apache.
the class IgfsDualAbstractSelfTest method testMoveDirectoryDestinationMissingPartially.
/**
* Test move in case destination exists partially and the path being renamed is a directory.
*
* @throws Exception If failed.
*/
public void testMoveDirectoryDestinationMissingPartially() throws Exception {
create(igfsSecondary, paths(DIR, SUBDIR, SUBSUBDIR, DIR_NEW, SUBDIR_NEW), null);
create(igfs, paths(DIR, SUBDIR, SUBSUBDIR, DIR_NEW), null);
igfs.rename(SUBSUBDIR, SUBDIR_NEW);
checkExist(igfs, SUBDIR_NEW);
checkExist(igfs, igfsSecondary, new IgfsPath(SUBDIR_NEW, SUBSUBDIR.name()));
checkNotExist(igfs, igfsSecondary, SUBSUBDIR);
}
use of org.apache.ignite.igfs.IgfsPath in project ignite by apache.
the class IgfsDualAbstractSelfTest method testMoveFileSourceParentRootDestinationMissingPartially.
/**
* Test file move when source parent is the root and destination is missing partially.
*
* @throws Exception If failed.
*/
public void testMoveFileSourceParentRootDestinationMissingPartially() throws Exception {
IgfsPath file = new IgfsPath("/" + FILE.name());
create(igfsSecondary, paths(DIR_NEW, SUBDIR_NEW), paths(file));
create(igfs, paths(DIR_NEW), null);
igfs.rename(file, SUBDIR_NEW);
checkExist(igfs, SUBDIR_NEW);
checkExist(igfs, igfsSecondary, new IgfsPath(SUBDIR_NEW, FILE.name()));
checkNotExist(igfs, igfsSecondary, file);
}
Aggregations