-
Notifications
You must be signed in to change notification settings - Fork 882
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CASSJAVA-40: Driver testing against Java 21 #1999
base: 4.x
Are you sure you want to change the base?
Conversation
…before run tests
@@ -77,7 +78,7 @@ public static <ElementT> void shuffleHead(@NonNull ElementT[] elements, int n) { | |||
* Fisher-Yates shuffle</a> | |||
*/ | |||
public static <ElementT> void shuffleHead( | |||
@NonNull ElementT[] elements, int n, @NonNull ThreadLocalRandom random) { | |||
@NonNull ElementT[] elements, int n, @NonNull Random random) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mockito says they can no longer support mocking of ThreadLocalRandom
.
This fix will also close JAVA-3137.
@@ -79,7 +79,7 @@ public class QueryTraceFetcherTest { | |||
@Mock private NettyOptions nettyOptions; | |||
@Mock private EventExecutorGroup adminEventExecutorGroup; | |||
@Mock private EventExecutor eventExecutor; | |||
@Mock private InetAddress address; | |||
private InetAddress address = InetAddress.getLoopbackAddress(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mockito can no longer mock InetAddress
as it becomes final
in newer JDK versions.
The three runs about JDK 21 all got green: https://ci-cassandra.apache.org/blue/organizations/jenkins/cassandra-java-driver-mck/detail/java21/10/pipeline/ |
@@ -409,7 +410,16 @@ protected void processLine(String line, int logLevel) { | |||
executor.setStreamHandler(streamHandler); | |||
executor.setWatchdog(watchDog); | |||
|
|||
int retValue = executor.execute(cli); | |||
int retValue; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I modified CcmBridge
because the latest commit on guava shaded broke the CI, cuz some how there are two source files that are not compiled in mvn install
but compiled in mvn verify
. Maybe we need to figure out why that happens and fix that instead, and revert the CcmBridge
changes here.
TODO: change the docker image name to "apache.jfrog.io/cassan-docker/apache/cassandra-java-driver-testing-ubuntu2204" after Mick update the docker image.