david-streamlio commented on PR #25883: URL: https://github.com/apache/pulsar/pull/25883#issuecomment-4614345115
Thanks for the review, @lhotari! I've added the integration test coverage you asked for. It follows the approach you suggested exactly. **New module: `tests/pulsar-client-native-image`** - **`NativeImageTesterApp`** — a small CLI application (the "native application") with subcommands that perform the actual logic of each test case (e.g. `produce`, `consume`, `produce-consume`). It's the binary that gets compiled to a native image via the `native-maven-plugin`. - **`NativeImageSmokeTest`** — a TestNG driver that invokes the compiled native binary through `java.lang.ProcessBuilder`, passing the relevant CLI options per case. It first verifies the client compiles to a native image, then runs a basic produce/consume smoke test against a Pulsar broker started with Testcontainers (`PulsarContainer`). - Wired into `tests/pom.xml` behind a `nativeImageTests` profile so it's opt-in and doesn't slow the default build. Added a nightly + `workflow_dispatch` GitHub Actions workflow (`ci-pulsar-native-image.yaml`) that runs it on a GraalVM community JDK. I went with the separate-native-application + ProcessBuilder design rather than native-compiling the TestNG class directly, since (as you noted) TestNG native support is missing today. Happy to revisit that toward JUnit Jupiter if/when the migration lands. I also added native-image metadata for `pulsar-client-admin` (`reflect-config.json` / `resource-config.json` / `native-image.properties`) covering the Jackson-serialized admin model classes and the runtime-initialized `AsyncHttpConnector`, with a static validator test — so admin-based client apps compile too. Let me know if you'd like any changes to the test structure or CLI surface. -- 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]
