Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[improve][pip] PIP-390 Improve the reusability of Pulsar test code and best practice for unit and integration tests for Pulsar #23565

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

heesung-sn
Copy link
Contributor

This is a PIP

…e and best practices for unit and integration tests in Pulsar
Copy link

github-actions bot commented Nov 5, 2024

@heesung-sn Please add the following content to your PR description and select a checkbox:

- [ ] `doc` <!-- Your PR contains doc changes -->
- [ ] `doc-required` <!-- Your PR changes impact docs and you will update later -->
- [ ] `doc-not-needed` <!-- Your PR changes do not impact docs -->
- [ ] `doc-complete` <!-- Docs have been already added -->

@heesung-sn heesung-sn changed the title [improve][pip] Improve the reusability of Pulsar integration test code and best practices for unit and integration tests in Pulsar [improve][pip] PIP-390 Improve the reusability of Pulsar integration test code and best practices for unit and integration tests in Pulsar Nov 5, 2024
@heesung-sn heesung-sn changed the title [improve][pip] PIP-390 Improve the reusability of Pulsar integration test code and best practices for unit and integration tests in Pulsar [improve][pip] PIP-390 Improve the reusability of Pulsar integration test code and best practices for unit and integration tests for Pulsar Nov 5, 2024
@heesung-sn heesung-sn changed the title [improve][pip] PIP-390 Improve the reusability of Pulsar integration test code and best practices for unit and integration tests for Pulsar [improve][pip] PIP-390 Improve the reusability of Pulsar test code and best practices for unit and integration tests for Pulsar Nov 12, 2024
@heesung-sn heesung-sn changed the title [improve][pip] PIP-390 Improve the reusability of Pulsar test code and best practices for unit and integration tests for Pulsar [improve][pip] PIP-390 Improve the reusability of Pulsar test code and best practice for unit and integration tests for Pulsar Nov 12, 2024

- Pulsar integration tests are located in the `tests` module, which run on [testcontainers](https://github.com/testcontainers).
- Pulsar unit tests are located in each module under the test scope, with many tests running on mocked (in-memory) Pulsar clusters.
- Currently, Pulsar tests run on the `testng` framework.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- Currently, Pulsar tests run on the `testng` framework.
- Currently, Pulsar tests run on the [TestNG](https://testng.org/#_welcome_to_testng).

Copy link
Contributor

Choose a reason for hiding this comment

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

I believe that directly providing the framework link may be clearer.

Copy link
Contributor

Choose a reason for hiding this comment

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

So is Pulsar's testing going to switch to using JUnit 5 and remove testng?

Copy link
Member

Choose a reason for hiding this comment

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

So is Pulsar's testing going to switch to using JUnit 5 and remove testng?

@falser101 Perhaps eventually, but that will take a very long time. Instead of having the goal of converting from TestNG to JUnit5, I believe that it would be more valuable to first provide ways to create JUnit5 tests. There's not much value in doing a 1-to-1 mapping from TestNG to JUnit5.

Copy link
Contributor

Choose a reason for hiding this comment

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

So is Pulsar's testing going to switch to using JUnit 5 and remove testng?

@falser101 Perhaps eventually, but that will take a very long time. Instead of having the goal of converting from TestNG to JUnit5, I believe that it would be more valuable to first provide ways to create JUnit5 tests. There's not much value in doing a 1-to-1 mapping from TestNG to JUnit5.

yes, maybe we can commit the first JUnit5 test case

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I realized this pip is too much ambitious, and I am not sure it is practical any more. I am thinking of closing this PIP.

@lhotari lhotari mentioned this pull request Jan 9, 2025
16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants