You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "david-streamlio (via GitHub)" <gi...@apache.org> on 2026/07/15 15:10:04 UTC
[PR] [improve][test] KCA: add pulsar-buildtools so broker tests compile (WIP) [pulsar-connectors]
david-streamlio opened a new pull request, #119:
URL: https://github.com/apache/pulsar-connectors/pull/119
**Draft / WIP — refs #118. Not for merge yet.**
### What this does
Re-enables **compilation** of the 5 broker-dependent Kafka Connect Adaptor test files (`KafkaConnectSinkTest`, `KafkaConnectSourceTest`, `KafkaConnectSourceErrTest`, `KafkaConnectSourceErrRecTest`, `PulsarOffsetBackingStoreTest`) that were excluded via `brokerDependentTestSources`.
### Why the old exclusion note was wrong
The exclusion (added in #31) said the tests were "waiting for matching pulsar artifacts to be published." They are not: every class they need is already published in the pinned `pulsar = 4.2.0`. The only missing piece was **`TestRetrySupport`** — the root of the `ProducerConsumerBase → MockedPulsarServiceBaseTest → TestRetrySupport` chain — which lives in `org.apache.pulsar:buildtools` and simply wasn't declared as a test dependency. Every earlier compile error (`log has private access`, `getSchemaVersion()` unimplemented, Lombok `builder()`/setter failures) was a **cascade** from that one missing supertype.
### Change
- Add `testImplementation(libs.pulsar.buildtools)`.
- Remove the `brokerDependentTestSources` compile exclusion.
`./gradlew :kafka-connect-adaptor:compileTestJava` now succeeds. CI stays green: the existing 35 unit tests still run and pass.
### Why WIP — the tests compile but do not execute
With the exclusion gone, the 5 classes compile but are **not executed** locally: TestNG silently skips every `ProducerConsumerBase` subclass in this repo's Gradle harness (reproduced with a 15-line probe; ruled out group filtering, TestNG version conflicts, and missing classpath entries — no errors, no result XML, no broker startup). This is a Gradle-9/TestNG harness issue, documented in detail on #118, and is the remaining work before this connector's sink/source coverage (currently 0%) is actually restored.
One reason to open this now: **Linux CI here will show whether that TestNG-skip is environment-specific** (it was observed on macOS). If CI executes and passes the broker tests, the execution blocker may already be resolved on Linux and this can graduate from WIP.
### Checklist
- [x] `doc-not-needed`
--
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] [improve][test] KCA: re-enable broker tests (add buildtools + opentelemetry-sdk-testing) [pulsar-connectors]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #119:
URL: https://github.com/apache/pulsar-connectors/pull/119#discussion_r3589168686
##########
kafka-connect-adaptor/build.gradle.kts:
##########
@@ -55,24 +55,17 @@ dependencies {
testImplementation(libs.pulsar.broker)
testImplementation(variantOf(libs.pulsar.broker) { classifier("tests") })
testImplementation(libs.pulsar.testmocks)
+ // Provides TestRetrySupport, the base class of MockedPulsarServiceBaseTest /
+ // ProducerConsumerBase used by the broker-backed tests below.
+ testImplementation(libs.pulsar.buildtools)
+ // pulsar-broker's tests jar references io.opentelemetry.sdk.testing.assertj.* in method
+ // signatures; without this on the classpath, TestNG's getDeclaredMethods() call during test
+ // discovery throws NoClassDefFoundError and silently collects zero tests from every
+ // MockedPulsarServiceBaseTest subclass.
+ testImplementation("io.opentelemetry:opentelemetry-sdk-testing:1.56.0")
Review Comment:
Use the version catalog alias for `opentelemetry-sdk-testing` instead of a hard-coded GAV+version. The shared enforced platform already manages OpenTelemetry versions via the catalog, and this dependency appears to be required only on the test runtime classpath for TestNG discovery (no compile-time references in this module).
--
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] [improve][test] KCA: re-enable broker tests (add buildtools + opentelemetry-sdk-testing) [pulsar-connectors]
Posted by "david-streamlio (via GitHub)" <gi...@apache.org>.
david-streamlio merged PR #119:
URL: https://github.com/apache/pulsar-connectors/pull/119
--
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] [improve][test] KCA: add pulsar-buildtools so broker tests compile (WIP) [pulsar-connectors]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #119:
URL: https://github.com/apache/pulsar-connectors/pull/119#discussion_r3588729967
##########
kafka-connect-adaptor/build.gradle.kts:
##########
@@ -55,24 +55,12 @@ dependencies {
testImplementation(libs.pulsar.broker)
testImplementation(variantOf(libs.pulsar.broker) { classifier("tests") })
testImplementation(libs.pulsar.testmocks)
+ // Provides TestRetrySupport, the base class of MockedPulsarServiceBaseTest /
+ // ProducerConsumerBase used by the broker-backed tests below.
Review Comment:
The comment says "broker-backed tests below", but there is no longer a list or section of tests below this block (the old exclusion list was removed). Consider rewording to avoid implying the tests are listed here and to clarify it refers to broker-backed tests in this module.
--
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