This is an automated email from the ASF dual-hosted git repository.

snuyanzin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git

commit 8eef95f62d96f8d5682e313c0291b85af144812b
Author: Sergey Nuyanzin <[email protected]>
AuthorDate: Tue May 26 17:42:30 2026 +0200

    [hotfix][tests] Migrate `ClusterUncaughtExceptionHandlerITCase` to JUnit5
---
 .../ClusterUncaughtExceptionHandlerITCase.java     | 25 +++++++++++-----------
 1 file changed, 13 insertions(+), 12 deletions(-)

diff --git 
a/flink-runtime/src/test/java/org/apache/flink/runtime/entrypoint/ClusterUncaughtExceptionHandlerITCase.java
 
b/flink-runtime/src/test/java/org/apache/flink/runtime/entrypoint/ClusterUncaughtExceptionHandlerITCase.java
index d6d5887d417..fb5457a9986 100644
--- 
a/flink-runtime/src/test/java/org/apache/flink/runtime/entrypoint/ClusterUncaughtExceptionHandlerITCase.java
+++ 
b/flink-runtime/src/test/java/org/apache/flink/runtime/entrypoint/ClusterUncaughtExceptionHandlerITCase.java
@@ -28,30 +28,31 @@ import org.apache.flink.runtime.testutils.TestJvmProcess;
 import org.apache.flink.runtime.util.ClusterUncaughtExceptionHandler;
 import org.apache.flink.util.FatalExitExceptionHandler;
 import org.apache.flink.util.OperatingSystem;
-import org.apache.flink.util.TestLogger;
+import org.apache.flink.util.TestLoggerExtension;
 import org.apache.flink.util.concurrent.ScheduledExecutor;
 
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
 
 import java.io.IOException;
 
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-import static org.junit.Assume.assumeTrue;
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assumptions.assumeThat;
 
 /** Integration test to check exit behaviour for the {@link 
ClusterUncaughtExceptionHandler}. */
-public class ClusterUncaughtExceptionHandlerITCase extends TestLogger {
+@ExtendWith(TestLoggerExtension.class)
+class ClusterUncaughtExceptionHandlerITCase {
 
-    @Before
-    public void ensureSupportedOS() {
+    @BeforeEach
+    void ensureSupportedOS() {
         // based on the assumption in JvmExitOnFatalErrorTest, and manual 
testing on Mac, we do not
         // support all platforms (in particular not Windows)
-        assumeTrue(OperatingSystem.isLinux() || OperatingSystem.isMac());
+        assumeThat(OperatingSystem.isLinux() || 
OperatingSystem.isMac()).isTrue();
     }
 
     @Test
-    public void testExitDueToUncaughtException() throws Exception {
+    void testExitDueToUncaughtException() throws Exception {
         final ForcedJVMExitProcess testProcess =
                 new ForcedJVMExitProcess(ClusterTestingEntrypoint.class);
 
@@ -64,7 +65,7 @@ public class ClusterUncaughtExceptionHandlerITCase extends 
TestLogger {
                     FatalExitExceptionHandler
                             .EXIT_CODE; // for FAIL mode, exit is done using 
this handler.
             int unsignedIntegerExitCode = ((byte) signedIntegerExitCode) & 
0xFF;
-            assertThat(testProcess.exitCode(), is(unsignedIntegerExitCode));
+            
assertThat(testProcess.exitCode()).isEqualTo(unsignedIntegerExitCode);
             success = true;
         } finally {
             if (!success) {

Reply via email to