Croway commented on PR #2079:
URL: 
https://github.com/apache/camel-spring-boot/pull/2079#issuecomment-6742513733

   Thanks @gnodet. In addition to davsclaus's review:
   
   **The platform-http case named in the description is still not fixed.** 
`SpringBootPlatformHttpAutoConfiguration.platformHttpEngineRequestMapping` is 
deliberately eager (CAMEL-24351) and calls 
`camelContext.getComponent("platform-http")` during singleton 
pre-instantiation. So the component is customized before 
`requestMappingHandlerAdapter` calls 
`SpringBootPlatformWebMvcConfiguration.configureAsyncSupport`, which is where 
`requestTimeout` is written into the configuration bean. I checked this on this 
branch with a test set up like `SpringBootPlatformHttpRequestTimeoutTest`, but 
with only `spring.mvc.async.request-timeout=30s`:
   
       configuration.requestTimeout=30000 component.requestTimeout=0
   
   Calling `copyConfigurationProperties` after startup on a new 
`PlatformHttpComponent` gives 30000, so the helper change works and the problem 
is the ordering, at least in that setup. The starter-level test for this would 
fail as the PR stands. The bridge needs to set the value on the component 
itself, for example as a `ComponentCustomizer` like the Kafka bridge on main 
(e7850714524, with the precedence fix from 115f626f4e7 / CAMEL-22760), applying 
`spring.mvc.async.request-timeout` only when 
`camel.component.platform-http.request-timeout` is not set. The helper change 
is still needed for application code that assigns values to a configuration 
bean (the `setSkipRequestHeaders(true)` case in the JIRA).
   
   
**`testCopyConfigurationPropertiesDoesNotCopyProgrammaticValueMatchingDefault` 
duplicates 
`testCopyConfigurationPropertiesDoesNotOverwriteWithCatalogDefault`.** 
`configWithoutDrift()` already sets `secure` to `false`, so 
`cfg.setSecure(false)` changes nothing, and the test passes with or without 
this PR. To cover the new comparison, pass a `MyDriftedConfiguration` whose 
`anotherOptionOnlyCarryingItsDefault` is left at its default. It must still be 
dropped, without failing. This also restores the coverage the JIRA asks for in 
`testCopyConfigurationPropertiesIgnoresDefaultThatCannotBeSet`.
   
   Smaller: besides `starter-configuration.adoc`, the Javadoc of 
`copyConfigurationProperties` and the comment above the filter still say that 
only options recorded in `BoundConfigurationProperties` are copied.
   
   _Claude Code on behalf of Federico Mariani_
   


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