32
32
import org .apache .hadoop .test .GenericTestUtils ;
33
33
import org .apache .hadoop .util .StringUtils ;
34
34
35
- import org .junit .Test ;
36
- import org .junit .BeforeClass ;
37
- import org .junit .AfterClass ;
38
- import static org .junit .Assert .*;
35
+ import org .junit .jupiter .api .Test ;
36
+ import org .junit .jupiter .api .BeforeAll ;
37
+ import org .junit .jupiter .api .AfterAll ;
38
+ import static org .junit .jupiter .api .Assertions .assertEquals ;
39
+ import static org .junit .jupiter .api .Assertions .assertTrue ;
40
+ import static org .junit .jupiter .api .Assertions .assertNull ;
41
+ import static org .junit .jupiter .api .Assertions .fail ;
39
42
40
43
/**
41
44
* Basic functional tests on a fuse-dfs mount.
@@ -135,7 +138,7 @@ private static void checkFile(File f, String expectedContents)
135
138
fi .close (); // NB: leaving f unclosed prevents unmount
136
139
}
137
140
String s = new String (b , 0 , len );
138
- assertEquals ("File content differs" , expectedContents , s );
141
+ assertEquals (expectedContents , s , "File content differs" );
139
142
}
140
143
141
144
private static class RedirectToStdoutThread extends Thread {
@@ -227,13 +230,14 @@ private static Process establishMount(URI uri) throws IOException {
227
230
private static void teardownMount () throws IOException {
228
231
execWaitRet ("fusermount -u " + mountPoint );
229
232
try {
230
- assertEquals (0 , fuseProcess .waitFor ()); // fuse_dfs should exit cleanly
233
+ assertEquals (0 ,
234
+ fuseProcess .waitFor ()); // fuse_dfs should exit cleanly
231
235
} catch (InterruptedException e ) {
232
236
fail ("interrupted while waiting for fuse_dfs process to exit." );
233
237
}
234
238
}
235
239
236
- @ BeforeClass
240
+ @ BeforeAll
237
241
public static void startUp () throws IOException {
238
242
Configuration conf = new HdfsConfiguration ();
239
243
r = Runtime .getRuntime ();
@@ -245,7 +249,7 @@ public static void startUp() throws IOException {
245
249
fuseProcess = establishMount (fs .getUri ());
246
250
}
247
251
248
- @ AfterClass
252
+ @ AfterAll
249
253
public static void tearDown () throws IOException {
250
254
// Unmount before taking down the mini cluster
251
255
// so no outstanding operations hang.
0 commit comments