Skip to content

Commit

Permalink
[MINOR] fix(test): Disable System exit for HadoopTestBase (#2327)
Browse files Browse the repository at this point in the history
### What changes were proposed in this pull request?

Disable System exit for HadoopTestBase

### Why are the changes needed?

Without this, we cannot find the root cause of failure test, we can only find out the test process crashed.

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

Existing UTs.
  • Loading branch information
maobaolong authored Jan 6, 2025
1 parent 66c3f3c commit 74366d5
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.io.TempDir;

import org.apache.uniffle.common.util.ExitUtils;

import static org.junit.jupiter.api.Assertions.assertEquals;

public class HadoopTestBase implements Serializable {
Expand All @@ -42,6 +44,7 @@ public class HadoopTestBase implements Serializable {

@BeforeAll
public static void setUpHdfs(@TempDir File tempDir) throws Exception {
ExitUtils.disableSystemExit();
conf = new Configuration();
baseDir = tempDir;
conf.set(MiniDFSCluster.HDFS_MINIDFS_BASEDIR, baseDir.getAbsolutePath());
Expand Down

0 comments on commit 74366d5

Please sign in to comment.