This is an automated email from the ASF dual-hosted git repository. chia7712 pushed a commit to branch 3.7 in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/3.7 by this push: new db31bfb080f KAFKA-16472 Fix integration tests in Java with parameter name (#15663) db31bfb080f is described below commit db31bfb080f8dbd23c02472b269de99f63cc496f Author: PoAn Yang <pay...@apache.org> AuthorDate: Sat Apr 6 10:43:22 2024 +0800 KAFKA-16472 Fix integration tests in Java with parameter name (#15663) Following test cases don't really run kraft case. The reason is that the test info doesn't contain parameter name, so it always returns false in TestInfoUtils#isKRaft. 1) TopicCommandIntegrationTest 2) DeleteConsumerGroupsTest 3) AuthorizerIntegrationTest 4) DeleteOffsetsConsumerGroupCommandIntegrationTest We can fix it by adding options.compilerArgs << '-parameters' after Reviewers: Chia-Ping Tsai <chia7...@gmail.com> --- build.gradle | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build.gradle b/build.gradle index 15b60301e5d..ca3d2383b5e 100644 --- a/build.gradle +++ b/build.gradle @@ -280,6 +280,10 @@ subprojects { options.compilerArgs << "-Xlint:-options" } + // -parameters generates arguments with parameter names in TestInfo#getDisplayName. + // ref: https://github.com/junit-team/junit5/blob/4c0dddad1b96d4a20e92a2cd583954643ac56ac0/junit-jupiter-params/src/main/java/org/junit/jupiter/params/ParameterizedTest.java#L161-L164 + compileTestJava.options.compilerArgs.add "-parameters" + // We should only set this if Java version is < 9 (--release is recommended for >= 9), but the Scala plugin for IntelliJ sets // `-target` incorrectly if this is unset sourceCompatibility = minJavaVersion