Skip to content

Commit 5af2d3b

Browse files
committed
Add BeforeEach and AfterEach for Junit5
1 parent bc4f42a commit 5af2d3b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/contract/AbstractContractTrashTest.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
import org.apache.hadoop.fs.PathFilter;
2525
import org.apache.hadoop.fs.Trash;
2626
import org.apache.hadoop.fs.TrashPolicy;
27+
import org.junit.jupiter.api.AfterEach;
28+
import org.junit.jupiter.api.BeforeEach;
2729
import org.junit.jupiter.api.Test;
2830

2931
import java.io.IOException;
@@ -110,6 +112,7 @@
110112
*/
111113
public abstract class AbstractContractTrashTest extends AbstractFSContractTestBase {
112114

115+
@BeforeEach
113116
@Override
114117
public void setup() throws Exception {
115118
super.setup();
@@ -124,6 +127,7 @@ protected Configuration createConfiguration() {
124127
return conf;
125128
}
126129

130+
@AfterEach
127131
@Override
128132
public void teardown() throws Exception {
129133
final FileSystem fs = getFileSystem();

0 commit comments

Comments
 (0)