pulsar
pulsar copied to clipboard
[test] Integration test coverage
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
- [ ] Integration test for Admin CII
- [ ] Integration test for client tool https://github.com/apache/pulsar/pull/17616
- [ ] Integration test for perf tool
Security
- [ ] Integration test for TLS https://github.com/apache/pulsar/pull/17141
Websocket service
- [ ] With broker
- [ ] With proxy
- [ ] Separated service
Plugins
- [x] Integration test for Protocol handlers #17350 @andrasbeni
- [ ] Integration test for Broker interceptors #17515
- [x] Integration test for Broker message filters #17396
- [x] Integration test for Additional servlet (broker/proxy) #17450
@nodece Is handling the integration test of security
@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.
@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?
@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.
@andrasbeni Sound good to me.