Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,13 @@
import org.apache.hadoop.test.GenericTestUtils;
import org.apache.hadoop.util.StringUtils;

import org.junit.Test;
import org.junit.BeforeClass;
import org.junit.AfterClass;
import static org.junit.Assert.*;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.AfterAll;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.fail;

/**
* Basic functional tests on a fuse-dfs mount.
Expand Down Expand Up @@ -135,7 +138,7 @@ private static void checkFile(File f, String expectedContents)
fi.close(); // NB: leaving f unclosed prevents unmount
}
String s = new String(b, 0, len);
assertEquals("File content differs", expectedContents, s);
assertEquals(expectedContents, s, "File content differs");
}

private static class RedirectToStdoutThread extends Thread {
Expand Down Expand Up @@ -227,13 +230,14 @@ private static Process establishMount(URI uri) throws IOException {
private static void teardownMount() throws IOException {
execWaitRet("fusermount -u " + mountPoint);
try {
assertEquals(0, fuseProcess.waitFor()); // fuse_dfs should exit cleanly
assertEquals(0,
fuseProcess.waitFor()); // fuse_dfs should exit cleanly
} catch (InterruptedException e) {
fail("interrupted while waiting for fuse_dfs process to exit.");
}
}

@BeforeClass
@BeforeAll
public static void startUp() throws IOException {
Configuration conf = new HdfsConfiguration();
r = Runtime.getRuntime();
Expand All @@ -245,7 +249,7 @@ public static void startUp() throws IOException {
fuseProcess = establishMount(fs.getUri());
}

@AfterClass
@AfterAll
public static void tearDown() throws IOException {
// Unmount before taking down the mini cluster
// so no outstanding operations hang.
Expand Down