runom commented on PR #11735: URL: https://github.com/apache/kafka/pull/11735#issuecomment-1120353470
@dajac I'm so sorry for the delay in my response. I tried to add a unit test but could not figure out how to do it. 1. I'm not sure how to check that `printHelpAndExitIfNeeded` was called. (only `--version` option, I could check like [this](https://github.com/runom/kafka/commit/d685541a90cb32413807ac167c646c9b373d2f94)) 2. There are many other tools (that use [CommandDefaultOptions](https://github.com/apache/kafka/blob/f7db6031b84a136ad0e257df722b20faa7c37b8a/core/src/main/scala/kafka/utils/CommandDefaultOptions.scala#L22-L27)) with `--help`, `--version` options. (`bin/kafka-configs.sh`, `bin/kafka-topics.sh`, etc.) These tools are working correctly with the options, but I thought it would be better to add tests for all of them. Please let me know if there is a good way to add unit tests. Thanks. -- 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]
