merlimat opened a new pull request, #25586:
URL: https://github.com/apache/pulsar/pull/25586

   ## Summary
   
   First end-to-end test for the PIP-468 V5 client, plus the small plumbing
   fix it surfaced.
   
   ### Plumbing fix — segment-domain bypass for V5 internals
   
   The V4 client rejects \`segment://\` topics for end-user subscribe / read
   paths (added in #25573 so the segment domain stays internal to the V5
   SDK). But the V5 \`ScalableQueueConsumer\` / \`ScalableStreamConsumer\` /
   \`ScalableCheckpointConsumer\` themselves build per-segment v4 consumers
   and readers and were tripping over the same check via the public
   \`ConsumerBuilder\` / \`ReaderBuilder\` paths.
   
   Two new internal-only entry points on \`PulsarClientImpl\` mirror the
   existing \`createSegmentProducerAsync\` escape hatch:
   
   - \`subscribeSegmentAsync(ConsumerConfigurationData, Schema)\`
   - \`createSegmentReaderAsync(ReaderConfigurationData, Schema)\`
   
   Both validate the config (single topic, valid topic name, sub /
   \`startMessageId\` set), then skip the scalable-domain check and dispatch
   to the existing single-topic codepaths. The three V5 internal classes
   build a config object directly and invoke the bypass instead of going
   through the v4 builder.
   
   ### End-to-end test infra
   
   - \`pulsar-broker\` test scope picks up \`pulsar-client-v5\` /
     \`pulsar-client-api-v5\` so V5 end-to-end tests can live next to the
     other client integration tests.
   - New \`V5ClientBaseTest\` extending \`SharedPulsarBaseTest\`:
     - \`newV5Client()\` — V5 PulsarClient against the shared in-memory
       cluster.
     - \`newScalableTopic(int)\` — creates a \`topic://\` scalable topic in
       the per-test namespace via the admin API.
     - \`track(...)\` registers producers / consumers / clients for ordered
       cleanup in \`@AfterMethod\`.
   - New \`V5SmokeTest\` exercises the full happy path on a 1-segment
     scalable topic:
     admin \`createScalableTopic\` → \`DagWatchClient\` session → per-segment
     producer create → wire send → per-segment consumer attach → receive
     → ack.
   
   This is the start of a phased E2E test suite. Subsequent PRs will add
   per-consumer-type basic tests (Stream / Queue / Checkpoint), schema
   matrix, producer / consumer feature coverage, and (separately, on a
   multi-broker base class) controller leader-election / redirect /
   rebalance scenarios.
   
   ## Test plan
   
   - [x] \`./gradlew :pulsar-broker:test --tests
         "org.apache.pulsar.client.api.v5.V5SmokeTest"\` passes (1/1).
   - [x] \`./gradlew :pulsar-broker:checkstyleTest
         :pulsar-client-v5:checkstyleMain
         :pulsar-client-original:checkstyleMain\` clean.
   - [x] Pre-existing V5 unit tests (48 tests) and broker scalable tests
         still pass.


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