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

   # Description
   
   [CAMEL-26432](https://issues.apache.org/jira/browse/CAMEL-26432) follow-up: 
fixes 
`ChaosNettyHttpFaultTest.aComponentUnderANameOfItsOwnIsMatchedByItsDefaultName`,
 which fails on main since #28811 (this ticket) and #28863 (CAMEL-26487) were 
both merged, as reported by @apupier on #28811.
   
   Each PR passed on its own. #28863 makes a camel-netty-http endpoint keep the 
name of its component in its endpoint URI (`nh:http://localhost:9/stock` for a 
component added as `nh`; before, the endpoint URI was the address alone, 
`http://localhost:9/stock`). camel-chaos then saw a URI that starts with a name 
of the component in the context and matched it as `nh:...`, so the rule 
`component=nh` fired instead of `component=netty-http`, and the test got a 
`ChaosException` where it expects the 504 `NettyHttpOperationFailedException`.
   
   The chaos page says a camel-netty-http component added under another name is 
matched as `netty-http`. `ChaosPatterns.endpointUri` now keeps that: when the 
URI starts with a name of the component that is not its default name and the 
rest is an address with a scheme of its own (`http://...`), it is matched as 
`<default name>:<address>`, the same text as before #28863. Nothing else 
changes: a renamed component whose URI is not an address (`myseda:orders`, 
`activemq:queue:orders`) is still matched with the name it has in the context, 
and the usual case is unchanged.
   
   ## Tests
   
   - The existing test is the regression test; this PR only changes 
`ChaosPatterns`.
   - I could not run Maven on main here (the offline repository lacks the BOMs 
main moved to today), so I checked `endpointUri` itself in a standalone harness 
against camel-api, with the method copied as is: 10 cases (the renamed 
netty-http endpoint after and before CAMEL-26487, with options in the URI, the 
plain netty-http and undertow address URIs, renamed seda and jms, a usual URI, 
a component with no default name, a URI with no colon) all give the expected 
text; with the method from main, the two renamed netty-http cases after 
CAMEL-26487 give `nh:http://...`, the failure seen on Jenkins. CI is the first 
Maven run of the module.
   
   _Claude Code on behalf of allthingssecurity_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
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