chia7712 commented on code in PR #21026:
URL: https://github.com/apache/kafka/pull/21026#discussion_r2587860374


##########
build.gradle:
##########
@@ -551,6 +551,39 @@ subprojects {
     }
   }
 
+  task testWithJava25(type: Test, dependsOn: compileJava) {

Review Comment:
   ```
   Gradle Test Run :metadata:testWithJava25 > Gradle Test Executor 39 > 
MetadataImageNodeTest > shouldGetAclsImageNode() FAILED
       org.mockito.exceptions.base.MockitoException: 
       Mockito cannot mock this class: class 
org.apache.kafka.image.MetadataImage.
       Can not mock final classes with the following settings :
        - explicit serialization (e.g. withSettings().serializable())
        - extra interfaces (e.g. withSettings().extraInterfaces(...))
   
       You are seeing this disclaimer because Mockito is configured to create 
inlined mocks.
       You can learn about inline mocks and their limitations under item #39 of 
the Mockito class javadoc.
   
       Underlying exception : org.mockito.exceptions.base.MockitoException: 
Could not modify all classes [class org.apache.kafka.image.MetadataImage, class 
java.lang.Object]
           at 
org.apache.kafka.image.node.MetadataImageNodeTest.setup(MetadataImageNodeTest.java:40)
   
           Caused by:
           org.mockito.exceptions.base.MockitoException: Could not modify all 
classes [class org.apache.kafka.image.MetadataImage, class java.lang.Object]
               at net.bytebuddy.TypeCache.findOrInsert(TypeCache.java:168)
               at 
net.bytebuddy.TypeCache$WithInlineExpunction.findOrInsert(TypeCache.java:399)
               at net.bytebuddy.TypeCache.findOrInsert(TypeCache.java:190)
               at 
net.bytebuddy.TypeCache$WithInlineExpunction.findOrInsert(TypeCache.java:410)
   
   ```
   
   This task results in a mockito-related issue if the code is built under JDK 
8. I believe this is acceptable since it is a ci-specific task and we can avoid 
using JDK 8. However, it would be helpful to add a comment reminding developers 
about this issue



-- 
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]

Reply via email to