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

   ## Backport of #29856
   
   Cherry-pick of #29856 (CAMEL-26927: camel-wordpress - each endpoint uses its 
own site URL and credentials) onto `camel-4.18.x`.
   
   **Original PR:** #29856 - CAMEL-26927: camel-wordpress - each endpoint uses 
its own site URL and credentials
   **Original author:** @davsclaus
   **Target branch:** `camel-4.18.x`
   **JIRA:** [CAMEL-26927](https://issues.apache.org/jira/browse/CAMEL-26927), 
fix version 4.18.6
   
   ### Adapted, not a straight cherry-pick
   
   The code and test changes in `components/camel-wordpress` applied without 
conflicts. Three changes differ from #29856:
   
   - The upgrade-guide changes (`camel-4x-upgrade-guide-4_18.adoc`, 
`-4_22.adoc`, `-4_24.adoc`) are left out. The upgrade guides for every release 
live on `main`, and #29856 already added the 4.18.6 note there.
   - `WordpressServiceProvider.getInstance()` and its `init(...)` methods are 
not marked `@Deprecated` on this branch. A patch release does not deprecate 
API. The Javadoc says that the endpoints do not use the shared instance and 
points to `create(WordpressAPIConfiguration)`. This is the same as the 
`camel-4.22.x` backport.
   - The new `WordpressEndpointsUseTheirOwnSiteTest` extends 
`org.apache.camel.test.junit5.CamelTestSupport`, because this branch tests with 
camel-test-junit5 (camel-test-junit6 on `main`).
   
   ### Change (from #29856)
   
   - `WordpressServiceProvider.create(WordpressAPIConfiguration)` creates a 
provider for one site.
   - `WordpressEndpoint.getServiceProvider()` creates the endpoint's own 
provider (lazily) from the endpoint options. The endpoint no longer initialises 
`WordpressServiceProvider.getInstance()`.
   - The post and user producers and consumers, and the authentication warning 
of the producer, use the provider of their endpoint.
   - The provider fields are `volatile`, and the services map is immutable.
   - The module's test support and the disabled adapter ITs use `create(...)`.
   
   ### Tests
   
   New `WordpressEndpointsUseTheirOwnSiteTest` (3 tests). `./mvnw install` in 
`components/camel-wordpress` on `camel-4.18.x`: 24 tests pass, and the 12 
disabled adapter ITs are skipped. The build left no generated changes.
   
   _Claude Code on behalf of davsclaus_
   
   🤖 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