Search in sources :

Example 6 with FileIncompleteException

use of alluxio.exception.FileIncompleteException in project alluxio by Alluxio.

the class AlluxioJniFuseFileSystemTest method incompleteFileCannotOpen.

@Test
public void incompleteFileCannotOpen() throws Exception {
    AlluxioURI expectedPath = BASE_EXPECTED_URI.join("/foo/bar");
    FileInfo fi = setUpOpenMock(expectedPath);
    fi.setCompleted(false);
    when(mFileSystem.openFile(expectedPath)).thenThrow(new FileIncompleteException(expectedPath));
    assertEquals(-ErrorCodes.EFAULT(), mFuseFs.open("/foo/bar", mFileInfo));
}
Also used : FuseFileInfo(alluxio.jnifuse.struct.FuseFileInfo) FileInfo(alluxio.wire.FileInfo) FileIncompleteException(alluxio.exception.FileIncompleteException) AlluxioURI(alluxio.AlluxioURI) PrepareForTest(org.powermock.core.classloader.annotations.PrepareForTest) Test(org.junit.Test)

Aggregations

AlluxioURI (alluxio.AlluxioURI)6 FileIncompleteException (alluxio.exception.FileIncompleteException)6 FileInfo (alluxio.wire.FileInfo)4 Test (org.junit.Test)4 PrepareForTest (org.powermock.core.classloader.annotations.PrepareForTest)4 OpenDirectoryException (alluxio.exception.OpenDirectoryException)2 FuseFileInfo (alluxio.jnifuse.struct.FuseFileInfo)2 FuseFileInfo (ru.serce.jnrfuse.struct.FuseFileInfo)2 FileInStream (alluxio.client.file.FileInStream)1 InStreamOptions (alluxio.client.file.options.InStreamOptions)1 AlluxioConfiguration (alluxio.conf.AlluxioConfiguration)1 FileDoesNotExistException (alluxio.exception.FileDoesNotExistException)1 OpenFilePOptions (alluxio.grpc.OpenFilePOptions)1 InvalidPathException (java.nio.file.InvalidPathException)1