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

[test] Integration test coverage #17132

Closed
10 tasks done
codelipenghui opened this issue Aug 17, 2022 · 5 comments
Closed
10 tasks done

[test] Integration test coverage #17132

codelipenghui opened this issue Aug 17, 2022 · 5 comments
Assignees

Comments

@codelipenghui
Copy link
Contributor

codelipenghui commented Aug 17, 2022

Motivation

Improve integration test coverage https://github.com/apache/pulsar/tree/master/tests/integration
The integration test will run on a real cluster, not a mock environment like the unit test does.

Tools

Security

Websocket service

Plugins

@codelipenghui
Copy link
Contributor Author

@nodece Is handling the integration test of security

@andrasbeni
Copy link
Contributor

andrasbeni commented Sep 20, 2022

@codelipenghui , can you please let me know what tests you would like to see for the admin CLI? As I can see, runAdminCommandOnAnyBroker does use the admin cli and is used extensively by integrations tests. And there are some more usages through the constant ADMIN_SCRIPT. So it's not a dedicated test, but I think it already has some coverage.

@codelipenghui
Copy link
Contributor Author

@andrasbeni Most of the admin CLI integration tests are under tests/integration/cli and yes we already have some coverage for this part. I think we should also consider the improve the coverage for this part to avoid someone changing the output format or introducing new incompatible options. But it's not a very strong opinion, we need to maintain so many test codes in the future. WDYT?

@andrasbeni
Copy link
Contributor

@codelipenghui , I believe integration tests are too expensive to do a full validation of output and command line parameters. Having taken a quick look at admin command implementations and PulsarAdminToolTest, it looks to me that admin commands are designed to be easily unit tested: the PulsarAdmin can be mocked by setting a Supplier and CaptureStdOut makes their output verifiable. So, in my opinion, we would be much better off writing unit tests for all these.

@codelipenghui
Copy link
Contributor Author

@andrasbeni Sound good to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants