Skip to content

Commit

Permalink
fix fuse test
Browse files Browse the repository at this point in the history
  • Loading branch information
yupeng9 committed Apr 25, 2017
1 parent 0f7dc43 commit 9483dd3
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -54,18 +54,16 @@
// TODO(andreareale): this test suite should be completed
public class AlluxioFuseFileSystemTest {

private static final String TEST_MASTER_ADDRESS = "alluxio://localhost:19998";
private static final String TEST_ROOT_PATH = "/t/root";
private static final AlluxioURI BASE_EXPECTED_URI =
new AlluxioURI(TEST_MASTER_ADDRESS + TEST_ROOT_PATH);
new AlluxioURI(TEST_ROOT_PATH);

private AlluxioFuseFileSystem mFuseFs;
private FileSystem mFileSystem;
private FuseFileInfo mFileInfo;

@Before
public void before() throws Exception {
Configuration.set(PropertyKey.MASTER_ADDRESS, TEST_MASTER_ADDRESS);
Configuration.set(PropertyKey.FUSE_CACHED_PATHS_MAX, "0");

final List<String> empty = Collections.emptyList();
@@ -224,11 +222,11 @@ public void pathTranslation() throws Exception {
final LoadingCache<String, AlluxioURI> resolver =
mFuseFs.getPathResolverCache();

AlluxioURI expected = new AlluxioURI(TEST_MASTER_ADDRESS + TEST_ROOT_PATH);
AlluxioURI expected = new AlluxioURI(TEST_ROOT_PATH);
AlluxioURI actual = resolver.apply("/");
Assert.assertEquals("/ should resolve to " + expected, expected, actual);

expected = new AlluxioURI(TEST_MASTER_ADDRESS + TEST_ROOT_PATH + "/home/foo");
expected = new AlluxioURI(TEST_ROOT_PATH + "/home/foo");
actual = resolver.apply("/home/foo");
Assert.assertEquals("/home/foo should resolve to " + expected, expected, actual);
}

0 comments on commit 9483dd3

Please sign in to comment.