regarmukesh3g commented on PR #23349: URL: https://github.com/apache/kafka/pull/23349#issuecomment-5585064444
@m1a2st @chia7712 would one of you be willing to take a look? You are both frequent reviewers of the `tools` module. Some context that did not belong in the commit message. `GroupsCommand.execute()` calls `Exit.exit(exitCode)` in a `finally` block, which no other tool in the package does — `FeatureCommand`, `DelegationTokenCommand`, `MetadataQuorumCommand`, `GetOffsetShell` and `LeaderElectionCommand` all call `Exit.exit` exactly once from `main()` and let `execute()` propagate failures to `mainNoExit()`. The user-visible effect is that under a replaced exit procedure the exception is swallowed and `mainNoExit()` returns 0 for a command that actually failed. The two added tests fail without the fix: ``` testMainNoExitReturnsNonZeroWithoutExitingOnFailure() :: expected: <1> but was: <0> testExecuteDoesNotExitOnFailure() :: Expected java.lang.Exception to be thrown, but nothing was thrown. ``` The full CI build has not run because the PR lacks the `ci-approved` label, which only a committer can apply. -- 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]
