Skip to content

Conversation

leocavalhere6
Copy link

Description

  • Added convenience methods to build PulsarClient and PulsarAdmin.
  • Enabled starting the server without creating real files on disk.
  • Added unit tests to ensure usage via Java program.

Fixes: #10473

Motivation

Make PulsarStandaloneBuilder usable as a public API for unit tests, without requiring Docker/Testcontainers.

Modifications

  • Added buildClient() and buildAdmin() methods.
  • Create temporary directories for ZK and BK to avoid writing on disk.
  • Added PulsarStandaloneBuilderTest.java unit test.

Verifying this change

  • Ran mvn test to ensure all unit tests pass, including PulsarStandaloneBuilderTest.

Does this pull request potentially affect one of the following parts:

  • The public API

Documentation

  • doc-not-needed

- Added convenience methods to build PulsarClient and PulsarAdmin
- Enabled starting the server without creating real files on disk
- Added unit tests to ensure usage via Java program
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Sep 25, 2025
Comment on lines +120 to +121
Path tempZkDir = Files.createTempDirectory("zk");
Path tempBkDir = Files.createTempDirectory("bk");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These files would be left around in the temp directories. wipeData currently wipes data only at startup time.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These directories would also be created when it's not desired.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-not-needed Your PR changes do not impact docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants