You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
HashMapMockTest > concurrentHashMap_shouldBeSpied_Successfully() FAILED
java.lang.IllegalAccessException: class io.mockk.impl.InternalPlatform cannot access a member of class java.util.concurrent.ConcurrentHashMap (in module java.base) with modifiers "transient volatile"
at java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:[392])
at java.base/java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:674)
at java.base/java.lang.reflect.Field.checkAccess(Field.java:1102)
at java.base/java.lang.reflect.Field.get(Field.java:423)
at io.mockk.impl.InternalPlatform.copyFields$copy(InternalPlatform.kt:114)
at io.mockk.impl.InternalPlatform.copyFields(InternalPlatform.kt:121)
at io.mockk.impl.instantiation.AbstractMockFactory.spyk(AbstractMockFactory.kt:107)
at io.mockk.jvm.HashMapMockTest.concurrentHashMap_shouldBeSpied_Successfully(HashMapMockTest.kt:126)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If you are sure that this issue is important and should not be marked as stale just ask to put an important label.
The tests in
HashMapMockTest.kt
fail on more recent (16+) JDK versions.mockk/mockk/jvm/src/test/kotlin/io/mockk/jvm/HashMapMockTest.kt
Lines 36 to 43 in 02a6d45
https://github.com/mockk/mockk/runs/7519107510?check_suite_focus=true#step:7:393
This was discovered in #444 (comment) and #829.
For now, so I can make progress on #863, I've disabled the tests on JDK16+. I'm making this issue to link in the source code.
The text was updated successfully, but these errors were encountered: