Search in sources :

Example 6 with DeleteOptions

use of alluxio.client.file.options.DeleteOptions in project alluxio by Alluxio.

the class BaseFileSystemTest method delete.

/**
   * Tests for the {@link BaseFileSystem#delete(AlluxioURI, DeleteOptions)} method.
   */
@Test
public void delete() throws Exception {
    AlluxioURI file = new AlluxioURI("/file");
    DeleteOptions deleteOptions = DeleteOptions.defaults().setRecursive(true);
    mFileSystem.delete(file, deleteOptions);
    Mockito.verify(mFileSystemMasterClient).delete(file, deleteOptions);
}
Also used : DeleteOptions(alluxio.client.file.options.DeleteOptions) AlluxioURI(alluxio.AlluxioURI) PrepareForTest(org.powermock.core.classloader.annotations.PrepareForTest) Test(org.junit.Test)

Aggregations

DeleteOptions (alluxio.client.file.options.DeleteOptions)6 AlluxioURI (alluxio.AlluxioURI)5 Test (org.junit.Test)3 FileDoesNotExistException (alluxio.exception.FileDoesNotExistException)2 IOException (java.io.IOException)2 PrepareForTest (org.powermock.core.classloader.annotations.PrepareForTest)2 URIStatus (alluxio.client.file.URIStatus)1 CheckConsistencyOptions (alluxio.client.file.options.CheckConsistencyOptions)1 CreateDirectoryOptions (alluxio.client.file.options.CreateDirectoryOptions)1 CreateFileOptions (alluxio.client.file.options.CreateFileOptions)1 AlluxioException (alluxio.exception.AlluxioException)1 InvalidPathException (alluxio.exception.InvalidPathException)1 ArrayList (java.util.ArrayList)1 Matchers.anyString (org.mockito.Matchers.anyString)1