You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "merlimat (via GitHub)" <gi...@apache.org> on 2026/07/16 15:52:58 UTC
[PR] Scalable Topics: producer end-to-end tests + run `pulsar::st` tests in CI [pulsar-client-cpp]
merlimat opened a new pull request, #603:
URL: https://github.com/apache/pulsar-client-cpp/pull/603
### Motivation
Follow-up to #601 (the `pulsar::st` producer). That PR shipped the producer with broker-free unit tests; this one validates it **end-to-end against a real scalable-topics broker** and runs the `pulsar::st` tests in CI for the first time (they were built but never executed).
### Modifications
- **`tests/st/StProducerE2ETest.cc`** — end-to-end producer tests against a standalone broker. A keyed + keyless case that fans out across segments, asserting every send returns a segment-qualified `MessageId`, `lastSequenceId` advances, and `flush()`/`close()` succeed; and an async-batch case that fires many `sendAsync()` calls across keys and awaits them all (exercising the in-flight tracking and flush). Both are gated on the `PULSAR_ST_E2E` environment variable, so the ordinary broker-free unit-test run skips them.
- **`tests/st/docker-compose.yml`** — a single standalone `apachepulsar/pulsar:latest` broker for the e2e run. The image ships the scalable-topics controller and wire protocol; no extra broker config is needed to enable them.
- **`run-unit-tests.sh`** — a scalable-topics phase: bring the broker up, create the scalable topic the producer publishes to, run the full `pulsar-st-tests` (the 88 broker-free cases plus the e2e), then tear the broker down. This is the first place any `pulsar-st-tests` run in CI.
### What this validates
The whole producer data path works against the real broker: the DAG-watch lookup resolves the scalable topic, keys route to segments, a per-segment producer is created on the `segment://…` topic, and each publish comes back with a segment-qualified `MessageId`.
### Notes
- The 5.0.0-M1 image pinned by `apachepulsar/pulsar:latest` does not auto-create a scalable topic on lookup (a bug fixed in later releases), so the harness pre-creates it with `pulsar-admin scalable-topics create`. That step is harmless once the image carries the fix — the producer's `create_if_missing` lookup finds the topic either way — and can be dropped then.
- A full produce → consume round-trip will land with the consumer; until then, the broker-issued `MessageId` on each send is the landing check (the scalable-topic admin stats expose only DAG structure, not per-segment message counts).
### Verifying this change
- Locally against the M1 broker: **89 tests pass** with the broker up (88 broker-free + 2 e2e), and the e2e cases skip cleanly without it.
- clang-format-11 and clang-tidy (LLVM 18 / libstdc++) clean on the new test.
### Documentation
- [ ] `doc` <!-- Your PR contains doc changes -->
- [x] `doc-not-needed` <!-- Your PR changes do not impact docs -->
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Scalable Topics: producer end-to-end tests + run `pulsar::st` tests in CI [pulsar-client-cpp]
Posted by "BewareMyPower (via GitHub)" <gi...@apache.org>.
BewareMyPower merged PR #603:
URL: https://github.com/apache/pulsar-client-cpp/pull/603
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org