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

orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 95c697b9ca6f483ae3a2fb8df4896936bfdc484c
Author: Otavio Rodolfo Piske <[email protected]>
AuthorDate: Sat Jan 24 18:15:55 2026 +0000

    CAMEL-21196: modernize exception-based assertions in camel-exec
    
    Replace JUnit 3 style fail() call with modern JUnit 5 assertTrue()
    assertion with error message in ExecJava8IssueTest.
    
    Changes:
    - Updated import from Assertions.fail to Assertions.assertTrue
    - Converted fail("message") to assertTrue(condition, "message")
---
 .../java/org/apache/camel/component/exec/ExecJava8IssueTest.java    | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git 
a/components/camel-exec/src/test/java/org/apache/camel/component/exec/ExecJava8IssueTest.java
 
b/components/camel-exec/src/test/java/org/apache/camel/component/exec/ExecJava8IssueTest.java
index 30bdfa790ec5..415c1f3c808a 100644
--- 
a/components/camel-exec/src/test/java/org/apache/camel/component/exec/ExecJava8IssueTest.java
+++ 
b/components/camel-exec/src/test/java/org/apache/camel/component/exec/ExecJava8IssueTest.java
@@ -37,7 +37,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.fail;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 /**
  * Test to duplicate issues with Camel's exec command in Java 8 on Unix This 
issue appears to be caused by a race
@@ -54,9 +54,7 @@ public class ExecJava8IssueTest {
     @BeforeEach
     public void setUp() {
         tempDir = new File("target", tempDirName);
-        if (!(tempDir.mkdir())) {
-            fail("Couldn't create temp dir for test");
-        }
+        assertTrue(tempDir.mkdir(), "Couldn't create temp dir for test");
     }
 
     @AfterEach

Reply via email to