see-quick opened a new pull request, #22518: URL: https://github.com/apache/kafka/pull/22518
In https://github.com/apache/kafka/pull/21273 (KAFKA-19774, KIP-1066) promoted IBP_4_3_IV0 to LATEST_PRODUCTION and introduced IBP_4_4_IV0 as the new unstable version, but did not add corresponding test coverage for 4.4-IV0 in testFromVersionString, testShortVersion, or testVersion. This PR adds the missing assertions, along with the bare "4.3" version string mapping that was also absent. So I think the design overall is bad and it didn't prevent this problem. Therefore I have change the way how it wouild be detected. Now when someone adds a new MetadataVersion enum value (like IBP_4_5_IV0), all these tests automatically cover it because they iterate over every enum constant via: ``` @EnumSource(value = MetadataVersion.class). ``` No one needs to remember to add manual assertions. Before this change, forgetting to update the test (like what happened with IBP_4_4_IV0 in PR #21273) would silently pass. Now it can not happen. -- 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]
