davsclaus opened a new pull request, #28748:
URL: https://github.com/apache/camel/pull/28748

   _Claude Code on behalf of davsclaus_
   
   Part of [CAMEL-24726](https://issues.apache.org/jira/browse/CAMEL-24726): a 
flaky test.
   
   `ExportApiTest.aYamlRouteThatDoesNotLoadIsReportedAsCamelRunDoes` (from 
#28735) checks that `camel export` reports a YAML route that did not load with 
what `camel validate yaml` says (CAMEL-24851). It read the report from the log, 
with a log4j appender on the logger of `YamlLoadFailureReport`, and failed now 
and then in CI (for example in #28743, recovered by the retry of surefire) with 
no log event at all. #28739 made it set the level of that logger, for a command 
that turned the logging off before it in the same JVM, but it still failed: the 
test only sees the log of the current log4j context, and an earlier test in the 
same fork can have changed the logging after `YamlLoadFailureReport` got its 
logger.
   
   The test does not read the log any more. It wraps the start failure listener 
of the context of `camel export` (which logs the report), and checks:
   
   - that the export calls it once, with a YAML load failure 
(`YamlLoadFailureReport.isYamlLoadFailure`);
   - that the report for the files it is called with says what to write (`The 
route file did not load. camel validate yaml says what to write:`, the route 
file and `pollEnrich`).
   
   The test fails when the route loads (the export does not fail). The other 
tests of `ExportApiTest` still check that the export leaves the configuration 
of the logging as it is.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   https://claude.ai/code/session_0128ThHB3iQdrvSRLVBGRrdP
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to