-
Notifications
You must be signed in to change notification settings - Fork 76
"units (17)" check has been failing due to mockito #1342
Copy link
Copy link
Closed
Labels
api: firestoreIssues related to the googleapis/java-firestore API.Issues related to the googleapis/java-firestore API.
Description
...
[INFO] --- maven-surefire-plugin:3.1.0:test (default-test) @ google-cloud-firestore ---
[INFO] Using auto detected provider org.apache.maven.surefire.junit4.JUnit4Provider
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running com.google.cloud.firestore.OrderTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.641 s - in com.google.cloud.firestore.OrderTest
[INFO] Running com.google.cloud.firestore.FirestoreOptionsTest
Error: Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 0.28 s <<< FAILURE! - in com.google.cloud.firestore.FirestoreOptionsTest
Error: com.google.cloud.firestore.FirestoreOptionsTest.instantiateWithProjectId Time elapsed: 0.274 s <<< ERROR!
java.lang.ExceptionInInitializerError
at org.mockito.cglib.core.KeyFactory$Generator.generateClass(KeyFactory.java:167)
at org.mockito.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)
at org.mockito.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:217)
at org.mockito.cglib.core.KeyFactory$Generator.create(KeyFactory.java:145)
at org.mockito.cglib.core.KeyFactory.create(KeyFactory.java:117)
at org.mockito.cglib.core.KeyFactory.create(KeyFactory.java:109)
at org.mockito.cglib.core.KeyFactory.create(KeyFactory.java:105)
...
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @6eda5c9
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:199)
at java.base/java.lang.reflect.Method.setAccessible(Method.java:193)
at org.mockito.cglib.core.ReflectUtils$2.run(ReflectUtils.java:57)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
at org.mockito.cglib.core.ReflectUtils.<clinit>(ReflectUtils.java:47)
...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Google Cloud Firestore Parent 3.13.3-SNAPSHOT:
[INFO]
[INFO] Google Cloud Firestore Parent ...................... SUCCESS [ 1.542 s]
[INFO] proto-google-cloud-firestore-v1 .................... SUCCESS [ 1.109 s]
[INFO] proto-google-cloud-firestore-bundle-v1 ............. SUCCESS [ 0.331 s]
[INFO] grpc-google-cloud-firestore-v1 ..................... SUCCESS [ 0.354 s]
[INFO] Google Cloud Firestore ............................. FAILURE [ 6.982 s]
[INFO] proto-google-cloud-firestore-admin-v1 .............. SKIPPED
...
How to reproduce the error
~/java-firestore $ sdk use java 17.0.5-tem
...
~/java-firestore $ java -version
openjdk version "17.0.5" 2022-10-18
OpenJDK Runtime Environment Temurin-17.0.5+8 (build 17.0.5+8)
OpenJDK 64-Bit Server VM Temurin-17.0.5+8 (build 17.0.5+8, mixed mode, sharing)
~/java-firestore $ mvn test -am -pl google-cloud-firestore -Dtest='com.google.cloud.firestore.FirestoreOptionsTest#instantiateWithProjectId' -Dsurefire.failIfNoSpecifiedTests=false
...
[INFO] --- maven-surefire-plugin:3.1.0:test (default-test) @ google-cloud-firestore ---
[INFO] Using auto detected provider org.apache.maven.surefire.junit4.JUnit4Provider
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running com.google.cloud.firestore.FirestoreOptionsTest
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.391 s <<< FAILURE! - in com.google.cloud.firestore.FirestoreOptionsTest
[ERROR] com.google.cloud.firestore.FirestoreOptionsTest.instantiateWithProjectId Time elapsed: 0.317 s <<< ERROR!
java.lang.ExceptionInInitializerError
...
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
api: firestoreIssues related to the googleapis/java-firestore API.Issues related to the googleapis/java-firestore API.