From 42c73e8144a7aa6fe0cd209b20897c03c2253d31 Mon Sep 17 00:00:00 2001 From: Tom Clegg Date: Mon, 23 Mar 2020 14:02:57 -0400 Subject: [PATCH] 16053: Upgrade mockito for JDK 11 compatibility. Fixes: 17:19:59.486 [DEBUG] [TestEventLogger] org.arvados.client.logic.keep.FileDownloaderTest STARTED 17:19:59.573 [DEBUG] [TestEventLogger] 17:19:59.573 [DEBUG] [TestEventLogger] org.arvados.client.logic.keep.FileDownloaderTest > classMethod STARTED 17:19:59.593 [DEBUG] [TestEventLogger] 17:19:59.594 [DEBUG] [TestEventLogger] org.arvados.client.logic.keep.FileDownloaderTest > classMethod FAILED 17:19:59.594 [DEBUG] [TestEventLogger] org.mockito.exceptions.base.MockitoException: 17:19:59.594 [DEBUG] [TestEventLogger] Mockito cannot mock this class: class org.arvados.client.api.client.CollectionsApiClient. 17:19:59.594 [DEBUG] [TestEventLogger] 17:19:59.594 [DEBUG] [TestEventLogger] If you're not sure why you're getting this error, please report to the mailing list. 17:19:59.594 [DEBUG] [TestEventLogger] 17:19:59.594 [DEBUG] [TestEventLogger] 17:19:59.594 [DEBUG] [TestEventLogger] Java : 11 17:19:59.595 [DEBUG] [TestEventLogger] JVM vendor name : Debian 17:19:59.595 [DEBUG] [TestEventLogger] JVM vendor version : 11.0.6+10-post-Debian-1deb10u1 17:19:59.595 [DEBUG] [TestEventLogger] JVM name : OpenJDK 64-Bit Server VM 17:19:59.595 [DEBUG] [TestEventLogger] JVM version : 11.0.6+10-post-Debian-1deb10u1 17:19:59.595 [DEBUG] [TestEventLogger] JVM info : mixed mode, sharing 17:19:59.595 [DEBUG] [TestEventLogger] OS name : Linux 17:19:59.595 [DEBUG] [TestEventLogger] OS version : 4.9.0-12-amd64 17:19:59.595 [DEBUG] [TestEventLogger] 17:19:59.595 [DEBUG] [TestEventLogger] 17:19:59.595 [DEBUG] [TestEventLogger] You are seeing this disclaimer because Mockito is configured to create inlined mocks. 17:19:59.595 [DEBUG] [TestEventLogger] You can learn about inline mocks and their limitations under item #39 of the Mockito class javadoc. 17:19:59.595 [DEBUG] [TestEventLogger] 17:19:59.595 [DEBUG] [TestEventLogger] Underlying exception : org.mockito.exceptions.base.MockitoException: Could not modify all classes [class java.lang.Object, class org.arvados.client.api.client.BaseApiClient, class org.arvados.client.api.client.CollectionsApiClient, class org.arvados.client.api.client.BaseStandardApiClient] 17:19:59.595 [DEBUG] [TestEventLogger] at org.mockito.internal.runners.DefaultInternalRunner$1.withBefores(DefaultInternalRunner.java:38) Arvados-DCO-1.1-Signed-off-by: Tom Clegg --- sdk/java-v2/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/java-v2/build.gradle b/sdk/java-v2/build.gradle index 89f8a0cbb1..5b09db948a 100644 --- a/sdk/java-v2/build.gradle +++ b/sdk/java-v2/build.gradle @@ -21,7 +21,7 @@ dependencies { api 'com.typesafe:config:1.3.2' testImplementation 'junit:junit:4.12' - testImplementation 'org.mockito:mockito-core:2.12.0' + testImplementation 'org.mockito:mockito-core:3.3.3' testImplementation 'org.assertj:assertj-core:3.8.0' testImplementation 'com.squareup.okhttp3:mockwebserver:3.9.1' } -- 2.30.2