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

   **Depends on #29229** (CAMEL-26615), which adds the Floci AZ container to 
the Azure test-infra: until #29229 is merged,
   this PR also shows its commit. It stays a draft until then.
   
   ## Description
   
   The integration tests of camel-azure-eventhubs ran only against a real 
namespace (`connectionString`) and a storage
   account for the checkpoint store. [Floci 
AZ](https://github.com/floci-io/floci-az) emulates Event Hubs over AMQP 1.0,
   with an ActiveMQ Artemis broker that it starts itself through the Docker 
socket. This PR:
   
   - adds a `camel-test-infra-azure-eventhubs` module: a local service on Floci 
AZ (`camel infra run azure event-hubs`)
     with an event hub `camel-test` of 2 partitions, its connection string 
(`UseDevelopmentEmulator=true`) and the Blob
     endpoint of Floci AZ for the checkpoint store, and a remote one for Azure. 
The Floci AZ container gets the Docker
     socket (with SELinux labeling disabled, which a container needs to reach 
the socket where SELinux is enforcing), Docker
     publishes the broker on free host ports, and the service removes the 
broker at shutdown: Floci AZ labels the
     containers it creates with a resource namespace of the service, and the 
label is also registered with the resource
     reaper of Testcontainers. The Artemis image is pinned in 
`azure.eventhubs.broker.container`: Floci AZ copies AMQP
     libraries patched for one Artemis version into it, so it changes together 
with `azure.container`;
   - runs the five IT classes against it by default, and against Azure, as 
before, when the connection string is given;
   - skips the integration tests on ppc64le and s390x, where the Floci AZ image 
is not available.
   
   Changes to existing tests:
   
   - the consumer and event processor tests get an explicit 
`BlobCheckpointStore` on the Blob endpoint of the service: the
     component builds its Blob client only for 
`https://<account>.blob.core.windows.net`;
   - the two iterable tests of `EventHubsProducerOperationsIT` send to the 
partition they read (`PARTITION_ID`): they sent
     with no partition and read only the last one, which passed on Azure only 
when the service picked that partition;
   - the "Important Development Notes" of the component documentation say how 
to run the integration tests.
   
   Floci AZ 0.16.0 notes: it does not answer the `$management` request for the 
properties of a partition (no test needs
   it); it takes consumer group names as case-sensitive, while an event 
processor of the SDK lower-cases its consumer
   group, so the service declares both `$Default` and `$default`; and it starts 
the default namespace only when it is
   created, which the service does.
   
   ## Testing
   
   - The 8 integration tests pass against Floci AZ 0.16.0, and no broker 
container is left after a run; the unit tests pass.
   - The remote wiring was checked with the remote properties pointed at a 
Floci AZ.
   - Full reactor build; the test-infra metadata and the catalog copy of the 
documentation are regenerated.
   
   _Claude Code on behalf of Andrea Cosentino_
   
   🤖 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