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

Guillaume Nodet commented on CAMEL-27869:
-----------------------------------------

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

Two root causes confirmed:
1. CitrusComponent.createEndpoint() does not call setLog() on the endpoint 
(MockComponent propagates this at line 58 of MockComponent.java, but 
CitrusComponent skips it), so the log component option has no effect on the 
endpoint.
2. CitrusValidationProcessor.performCitrusValidation() calls 
registry.findMessageValidators() with mustFindValidator=false (the 2-arg 
overload), which silently falls back to the default text validator when a 
module (e.g. citrus-validation-json) is missing. The isEmpty() check at line 
189 is dead code and a missing module is never reported.

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

> camel-test-citrus: the component log and reportGroup options do nothing, a 
> missing validation module is never reported
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-27869
>                 URL: https://issues.apache.org/jira/browse/CAMEL-27869
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-test
>            Reporter: Claus Ibsen
>            Assignee: Guillaume Nodet
>            Priority: Minor
>             Fix For: 4.25.0
>
>
> Found while improving the option descriptions of camel-test-citrus for 
> CAMEL-23832 (commit 
> https://github.com/apache/camel/commit/1aaff12f7925110d68d6576bdc6977b75773cc4a,
>  pull request https://github.com/apache/camel/pull/31146).
> These are separate problems of the component; the descriptions change only 
> documents the current behavior.
> h4. 1. log and reportGroup have no effect
> {{CitrusComponent.createEndpoint}} does not do what 
> MockComponent.createEndpoint does: the component log option is never copied 
> (setLog missing), and reportGroup is set as a plain int without creating the 
> ThroughputLogger reporter.
> Proposed change: reuse the MockComponent logic.
> h4. 2. A missing validation module is never reported
> {{CitrusValidationProcessor.performCitrusValidation}}: the "No Citrus message 
> validator found" check cannot be reached, because findMessageValidators(type, 
> message) falls back to DefaultTextEqualsMessageValidator; so messageType=json 
> without citrus-validation-json silently compares the bodies as text.
> Proposed change: call findMessageValidators(type, message, true), or drop the 
> dead check.
> _Claude Code on behalf of davsclaus_



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

Reply via email to