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

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


The following commit(s) were added to refs/heads/main by this push:
     new d0af726f2dd1 CAMEL-26528: fix stale assertion in 
DevModeITCase.testDeleteFileViaHttp (#29151)
d0af726f2dd1 is described below

commit d0af726f2dd1e88d92706eb9c568c8e9e6ce063e
Author: Guillaume Nodet <[email protected]>
AuthorDate: Wed Nov 4 19:52:40 2026 +0100

    CAMEL-26528: fix stale assertion in DevModeITCase.testDeleteFileViaHttp 
(#29151)
    
    Since CAMEL-25427 deleting a route file is silent, so the old "does not 
exist" log assertion could never match. The test now checks the "Deleting 
file:" log and that route1 is running before the DELETE and gone after it.
    
    AI-generated by Hermes Agent on behalf of gnodet.
---
 .../java/org/apache/camel/dsl/jbang/it/DevModeITCase.java   | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git 
a/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/DevModeITCase.java
 
b/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/DevModeITCase.java
index f30c638f2be8..6bed1ee62518 100644
--- 
a/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/DevModeITCase.java
+++ 
b/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/DevModeITCase.java
@@ -31,6 +31,7 @@ import org.apache.camel.dsl.jbang.it.support.JBangTestSupport;
 import org.apache.camel.dsl.jbang.it.support.JiraIssue;
 import org.assertj.core.api.Assertions;
 import org.assertj.core.api.SoftAssertions;
+import org.awaitility.Awaitility;
 import org.junit.jupiter.api.Test;
 
 public class DevModeITCase extends JBangTestSupport {
@@ -92,10 +93,20 @@ public class DevModeITCase extends JBangTestSupport {
         copyResourceInDataFolder(TestResources.DIR_ROUTE);
         executeBackground(String.format("run --dev --console --source-dir=%s", 
mountPoint()));
         checkLogContains("Hello world!");
+        Awaitility.await("route1 running before delete")
+                .atMost(Duration.ofSeconds(ASSERTION_WAIT_SECONDS))
+                .untilAsserted(() -> Assertions.assertThat(execute("get 
route"))
+                        .as("route1 should be running before the DELETE")
+                        .contains("route1"));
         execInHost(String.format(
                 "curl -X DELETE 
http://localhost:%s/q/upload/FromDirectoryRoute.java";,
                 containerService.getDevConsolePort()));
-        checkLogContains("FromDirectoryRoute.java does not exist");
+        checkLogContains("Deleting file:");
+        Awaitility.await("route removed after file deletion")
+                .atMost(Duration.ofSeconds(ASSERTION_WAIT_SECONDS))
+                .untilAsserted(() -> Assertions.assertThat(execute("get 
route"))
+                        .as("route1 should be gone after 
FromDirectoryRoute.java is deleted")
+                        .doesNotContain("route1"));
     }
 
     @Test

Reply via email to