adoroszlai commented on code in PR #1494:
URL: https://github.com/apache/ratis/pull/1494#discussion_r3492955805
##########
pom.xml:
##########
@@ -402,6 +409,16 @@
<artifactId>mockito-core</artifactId>
<version>${mockito.version}</version>
</dependency>
+ <dependency>
+ <groupId>net.bytebuddy</groupId>
+ <artifactId>byte-buddy</artifactId>
+ <version>${byte-buddy.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>net.bytebuddy</groupId>
+ <artifactId>byte-buddy-agent</artifactId>
+ <version>${byte-buddy.version}</version>
+ </dependency>
Review Comment:
Mockito uses it to manipulate classes for mocking.
https://central.sonatype.com/artifact/org.mockito/mockito-core/4.11.0/dependencies
##########
pom.xml:
##########
@@ -402,6 +409,16 @@
<artifactId>mockito-core</artifactId>
<version>${mockito.version}</version>
</dependency>
+ <dependency>
+ <groupId>net.bytebuddy</groupId>
+ <artifactId>byte-buddy</artifactId>
+ <version>${byte-buddy.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>net.bytebuddy</groupId>
+ <artifactId>byte-buddy-agent</artifactId>
+ <version>${byte-buddy.version}</version>
+ </dependency>
Review Comment:
Without upgrading this transitive dependency, we get errors like:
```
Mockito cannot mock this class: class
org.apache.ratis.server.impl.RaftServerImpl
Mockito cannot mock this class: class
org.apache.ratis.grpc.server.GrpcLogAppender$RequestMap
Mockito cannot mock this class: interface
org.apache.ratis.statemachine.StateMachine
Mockito cannot mock this class: class java.io.File
```
https://github.com/adoroszlai/ratis/actions/runs/28196396158
We cannot upgrade Mockito itself, because Mockito 5 dropped support for Java
8.
https://github.com/mockito/mockito/releases/tag/v5.0.0
--
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]