[ 
https://issues.apache.org/jira/browse/CAMEL-26528?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18137882#comment-18137882
 ] 

Guillaume Nodet commented on CAMEL-26528:
-----------------------------------------

This issue is being investigated by a coding agent (on behalf of gnodet).

Root cause identified: commit 8f2fdff9bfc4 (CAMEL-25427, Oct 8, 2026) fixed 
RouteWatcherReloadStrategy to skip deleted files via isDeletedFile() checks, so 
the FileNotFoundException that generated the log message 
"FromDirectoryRoute.java does not exist" is no longer thrown. The test 
DevModeITCase.testDeleteFileViaHttp was introduced earlier (commit 
db7391b5c787, CAMEL-25240) expecting this log message, but the production code 
was subsequently fixed to handle deletions more gracefully, making the test 
assertion stale.

Fix: update the test to assert on a different signal that the route was removed 
after file deletion (e.g., route count drops to 0 or the route stops 
responding).

_Note: This comment was generated by an AI coding agent and requires manual 
verification._

> DevModeITCase.testDeleteFileViaHttp is broken on main branch
> ------------------------------------------------------------
>
>                 Key: CAMEL-26528
>                 URL: https://issues.apache.org/jira/browse/CAMEL-26528
>             Project: Camel
>          Issue Type: Test
>          Components: camel-jbang
>            Reporter: Aurélien Pupier
>            Assignee: Guillaume Nodet
>            Priority: Major
>
> it has failed on the last 15 builds:
> {noformat}
> Expecting code not to raise a throwable but caught
>   "org.awaitility.core.ConditionTimeoutException: Assertion condition defined 
> as a Lambda expression in 
> org.apache.camel.dsl.jbang.it.support.JBangTestSupport [log contains 
> FromDirectoryRoute.java does not exist] 
> Expecting actual:
>   "2026-11-02 16:02:09.055  INFO 3338 --- [           main] 
> org.apache.camel.main.MainSupport   : Apache Camel (JBang) 4.24.0-SNAPSHOT is 
> starting
> 2026-11-02 16:02:09.543  INFO 3338 --- [           main] 
> org.apache.camel.main.MainSupport   : Running Linux 5.15.0-202-generic (amd64)
> 2026-11-02 16:02:09.543  INFO 3338 --- [           main] 
> org.apache.camel.main.MainSupport   : Using Java 21.0.12.1 (OpenJDK 64-Bit 
> Server VM) with PID 3338
> 2026-11-02 16:02:09.544  INFO 3338 --- [           main] 
> org.apache.camel.main.MainSupport   : Started by jbang in /home/jbang
> 2026-11-02 16:02:16.160  INFO 3338 --- [           main] 
> apache.camel.main.ProfileConfigurer : The application is starting with 
> profile: dev
> 2026-11-02 16:02:20.921  INFO 3338 --- [           main] 
> mel.cli.connector.LocalCliConnector : Camel CLI connector enabled
> 2026-11-02 16:02:21.288  INFO 3338 --- [           main] 
> el.impl.engine.AbstractCamelContext : Apache Camel 4.24.0-SNAPSHOT 
> (58fbeea27aa68) is starting
> 2026-11-02 16:02:22.071  INFO 3338 --- [           main] 
> ore.spi.dns.AddressResolverProvider : Using the default address resolver as 
> the dns resolver could not be loaded
> 2026-11-02 16:02:22.532  INFO 3338 --- [ntloop-thread-0] 
> .http.vertx.VertxPlatformHttpServer : Vert.x HttpServer started on 
> 0.0.0.0:8080
> 2026-11-02 16:02:26.789  WARN 3338 --- [           main] 
> in.DefaultJolokiaPlatformHttpPlugin : No access restrictor found at: 
> classpath:/jolokia-access.xml, access to all MBeans is allowed. Mind that 
> this is an unsecure and dangerous configuration that you may only want to use 
> for development environments. NEVER use this in a production environment as 
> it would expose sensitive information with no authentication and is a 
> potential vector of remote attacks.
> 2026-11-02 16:02:26.882  INFO 3338 --- [           main] 
> in.DefaultJolokiaPlatformHttpPlugin : Creating 
> DefaultJolokiaPlatformHttpPlugin with Restrictor: 
> org.jolokia.server.core.restrictor.AllowAllRestrictor@573f2e67
> 2026-11-02 16:02:27.638  INFO 3338 --- [           main] 
> t.FileWatcherResourceReloadStrategy : Live route reloading enabled 
> (directory: /deployments/data/58fbeea27aa68)
> 2026-11-02 16:02:27.771  INFO 3338 --- [           main] 
> atform.http.main.MainHttpServerUtil : HTTP Management endpoints summary
> 2026-11-02 16:02:27.788  INFO 3338 --- [           main] 
> atform.http.main.MainHttpServerUtil :     http://0.0.0.0:8080/observe/info    
>    (GET)        (produce:application/json)
> 2026-11-02 16:02:27.788  INFO 3338 --- [           main] 
> atform.http.main.MainHttpServerUtil :     http://0.0.0.0:8080/q/dev           
>    (GET,POST)   (produce:text/plain,application/json)
> 2026-11-02 16:02:27.802  INFO 3338 --- [           main] 
> atform.http.main.MainHttpServerUtil :     http://0.0.0.0:8080/observe/health  
>    (GET)        (produce:application/json)
> 2026-11-02 16:02:27.803  INFO 3338 --- [           main] 
> atform.http.main.MainHttpServerUtil :     http://0.0.0.0:8080/observe/jolokia 
>    (GET,POST)   (produce:text/plain,application/json)
> 2026-11-02 16:02:27.803  INFO 3338 --- [           main] 
> atform.http.main.MainHttpServerUtil :     http://0.0.0.0:8080/q/upload        
>    (PUT,DELETE) (accept:multipart/form-data)
> 2026-11-02 16:02:27.804  INFO 3338 --- [           main] 
> atform.http.main.MainHttpServerUtil :     http://0.0.0.0:8080/q/download      
>    (GET)        (produce:text/plain,application/octet-stream)
> 2026-11-02 16:02:28.556  INFO 3338 --- [           main] 
> el.impl.engine.AbstractCamelContext : Routes startup (total:1)
> 2026-11-02 16:02:28.557  INFO 3338 --- [           main] 
> el.impl.engine.AbstractCamelContext :     Started route1 (timer://java)
> 2026-11-02 16:02:28.558  INFO 3338 --- [           main] 
> el.impl.engine.AbstractCamelContext : Apache Camel 4.24.0-SNAPSHOT 
> (58fbeea27aa68) started in 7s268ms (build:0ms init:0ms start:7s268ms 
> boot:12s222ms)
> 2026-11-02 16:02:28.900  INFO 3338 --- [ - timer://java] 
> FromDirectoryRoute.java:26          : Hello world!
> 2026-11-02 16:02:29.781  INFO 3338 --- [ - timer://java] 
> FromDirectoryRoute.java:26          : Hello world!
> 2026-11-02 16:02:30.781  INFO 3338 --- [ - timer://java] 
> FromDirectoryRoute.java:26          : Hello world!
> 2026-11-02 16:02:31.784  INFO 3338 --- [ - timer://java] 
> FromDirectoryRoute.java:26          : Hello world!
> 2026-11-02 16:02:32.782  INFO 3338 --- [ - timer://java] 
> FromDirectoryRoute.java:26          : Hello world!
> 2026-11-02 16:02:33.784  INFO 3338 --- [ - timer://java] 
> FromDirectoryRoute.java:26          : Hello world!
> 2026-11-02 16:02:34.790  INFO 3338 --- [ - timer://java] 
> FromDirectoryRoute.java:26          : Hello world!
> 2026-11-02 16:02:35.790  INFO 3338 --- [ - timer://java] 
> FromDirectoryRoute.java:26          : Hello world!
> 2026-11-02 16:02:36.791  INFO 3338 --- [ - timer://java] 
> FromDirectoryRoute.java:26          : Hello world!
> 2026-11-02 16:02:37.792  INFO 3338 --- [worker-thread-0] 
> form.http.main.ManagementHttpServer : Deleting file: 
> /deployments/data/58fbeea27aa68/FromDirectoryRoute.java
> 2026-11-02 16:02:37.792  INFO 3338 --- [ - timer://java] 
> FromDirectoryRoute.java:26          : Hello world!
> 2026-11-02 16:02:38.794  INFO 3338 --- [ - timer://java] 
> FromDirectoryRoute.java:26          : Hello world!
> "
> to contain:
>   "FromDirectoryRoute.java does not exist"  within 5 minutes.
>  at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:167)
>  at org.awaitility.core.AssertionCondition.await(AssertionCondition.java:119)
>  at org.awaitility.core.AssertionCondition.await(AssertionCondition.java:31)
>  at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:1160)
>  at 
> org.awaitility.core.ConditionFactory.untilAsserted(ConditionFactory.java:790)
>  at 
> org.apache.camel.dsl.jbang.it.support.JBangTestSupport.lambda$checkLogContains$0(JBangTestSupport.java:313)
>  at 
> org.assertj.core.api.ThrowableAssert.catchThrowable(ThrowableAssert.java:66)
>  at org.assertj.core.api.NotThrownAssert.isThrownBy(NotThrownAssert.java:46)
>  at 
> org.apache.camel.dsl.jbang.it.support.JBangTestSupport.checkLogContains(JBangTestSupport.java:311)
>  at 
> org.apache.camel.dsl.jbang.it.support.JBangTestSupport.checkLogContains(JBangTestSupport.java:307)
>  at 
> org.apache.camel.dsl.jbang.it.support.JBangTestSupport.checkLogContains(JBangTestSupport.java:299)
>  at 
> org.apache.camel.dsl.jbang.it.DevModeITCase.testDeleteFileViaHttp(DevModeITCase.java:100)
>  at 
> java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
>  at java.base/java.lang.reflect.Method.invoke(Method.java:565)
>  at 
> org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:700)
>  at 
> org.junit.platform.commons.support.ReflectionSupport.invokeMethod(ReflectionSupport.java:528)
>  at 
> org.junit.jupiter.engine.support.MethodReflectionUtils.invoke(MethodReflectionUtils.java:53)
>  at 
> org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:61)
>  at 
> org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:124)
>  at 
> org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:163)
>  at 
> org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:148)
>  at 
> org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:86)
>  at 
> org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:124)
>  at 
> org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:105)
>  at 
> org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:99)
>  at 
> org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:66)
>  at 
> org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:47)
>  at 
> org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:39)
>  at 
> org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:104)
>  at 
> org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:98)
>  at 
> org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invokeVoid(InterceptingExecutableInvoker.java:71)
>  at 
> org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$0(TestMethodTestDescriptor.java:219)
>  at 
> org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
>  at 
> org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:215)
>  at 
> org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:157)
>  at 
> org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:70)
>  at 
> org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$2(NodeTestTask.java:176)
>  at 
> org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
>  at 
> org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$1(NodeTestTask.java:166)
>  at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:139)
>  at 
> org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$0(NodeTestTask.java:164)
>  at 
> org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
>  at 
> org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:163)
>  at 
> org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:116)
>  at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
>  at 
> org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:42)
>  at 
> org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$2(NodeTestTask.java:180)
>  at 
> org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
>  at 
> org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$1(NodeTestTask.java:166)
>  at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:139)
>  at 
> org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$0(NodeTestTask.java:164)
>  at 
> org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
>  at 
> org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:163)
>  at 
> org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:116)
>  at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
>  at 
> org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:42)
>  at 
> org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$2(NodeTestTask.java:180)
>  at 
> org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
>  at 
> org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$1(NodeTestTask.java:166)
>  at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:139)
>  at 
> org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$0(NodeTestTask.java:164)
>  at 
> org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
>  at 
> org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:163)
>  at 
> org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:116)
>  at 
> org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:36)
>  at 
> org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:52)
>  at 
> org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:58)
>  at 
> org.junit.platform.launcher.core.EngineExecutionOrchestrator.executeEngine(EngineExecutionOrchestrator.java:256)
>  at 
> org.junit.platform.launcher.core.EngineExecutionOrchestrator.failOrExecuteEngine(EngineExecutionOrchestrator.java:228)
>  at 
> org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:189)
>  at 
> org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:109)
>  at 
> org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:66)
>  at 
> org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:168)
>  at 
> org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:65)
>  at 
> org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:137)
>  at 
> org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:126)
>  at 
> org.junit.platform.launcher.core.DelegatingLauncher.execute(DelegatingLauncher.java:71)
>  at 
> org.junit.platform.launcher.core.InterceptingLauncher.lambda$execute$2(InterceptingLauncher.java:66)
>  at 
> org.junit.platform.launcher.core.ClasspathAlignmentCheckingLauncherInterceptor.intercept(ClasspathAlignmentCheckingLauncherInterceptor.java:25)
>  at 
> org.junit.platform.launcher.core.InterceptingLauncher.execute(InterceptingLauncher.java:65)
>  at 
> org.junit.platform.launcher.core.DelegatingLauncher.execute(DelegatingLauncher.java:71)
>  at 
> java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
>  at java.base/java.lang.reflect.Method.invoke(Method.java:565)
>  at 
> org.apache.maven.surefire.api.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:125)
>  at 
> org.apache.maven.surefire.junitplatform.LauncherAdapter.executeWithCancellationToken(LauncherAdapter.java:68)
>  at 
> org.apache.maven.surefire.junitplatform.LauncherAdapter.execute(LauncherAdapter.java:54)
>  at 
> org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.lambda$execute$2(JUnitPlatformProvider.java:207)
>  at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133)
>  at 
> org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.execute(JUnitPlatformProvider.java:205)
>  at 
> org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invokeAllTests(JUnitPlatformProvider.java:168)
>  at 
> org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:132)
>  at 
> org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:385)
>  at 
> org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
>  at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:507)
>  at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:495)
> Caused by: java.util.concurrent.TimeoutException
>  at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:206)
>  at 
> org.awaitility.core.Uninterruptibles.getUninterruptibly(Uninterruptibles.java:101)
>  at 
> org.awaitility.core.Uninterruptibles.getUninterruptibly(Uninterruptibles.java:81)
>  at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:103)
>  ... 94 more
> "
> {noformat}



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to