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
Around 79 unit tests are failing when run with the debug build type, the usual build type used when developing the app.
To Reproduce
Run gradlew testOoniStableFullDebug or open and run a test manually on the Android Studio UI, with a buildVariant selected that ends in Debug.
Expected behavior
Those tests should have the same result and the release build type, since there's no applicable difference between the 2 build types.
Stacktrace
Could not initialize plugin: interface org.mockito.plugins.MockMaker (alternate: null)
java.lang.IllegalStateException: Could not initialize plugin: interface org.mockito.plugins.MockMaker (alternate: null)
at org.mockito.internal.configuration.plugins.PluginLoader$1.invoke(PluginLoader.java:85)
at jdk.proxy4/jdk.proxy4.$Proxy41.isTypeMockable(Unknown Source)
at org.mockito.internal.util.MockUtil.typeMockabilityOf(MockUtil.java:78)
at org.mockito.internal.util.MockCreationValidator.validateType(MockCreationValidator.java:22)
at org.mockito.internal.creation.MockSettingsImpl.validatedSettings(MockSettingsImpl.java:275)
at org.mockito.internal.creation.MockSettingsImpl.build(MockSettingsImpl.java:236)
at org.mockito.internal.MockitoCore.mock(MockitoCore.java:82)
at org.mockito.Mockito.mock(Mockito.java:2104)
at org.mockito.Mockito.mock(Mockito.java:2019)
at org.openobservatory.ooniprobe.domain.GetTestSuiteTest.testGetFromResult(GetTestSuiteTest.java:69)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.robolectric.RobolectricTestRunner$HelperTestRunner$1.evaluate(RobolectricTestRunner.java:489)
at org.robolectric.internal.SandboxTestRunner$2.lambda$evaluate$2(SandboxTestRunner.java:291)
at org.robolectric.internal.bytecode.Sandbox.lambda$runOnMainThread$0(Sandbox.java:104)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalStateException: Internal problem occurred, please report it. Mockito is unable to load the default implementation of class that is a part of Mockito distribution. Failed to load interface org.mockito.plugins.MockMaker
at org.mockito.internal.configuration.plugins.DefaultMockitoPlugins.create(DefaultMockitoPlugins.java:105)
at org.mockito.internal.configuration.plugins.DefaultMockitoPlugins.getDefaultPlugin(DefaultMockitoPlugins.java:79)
at org.mockito.internal.configuration.plugins.PluginLoader.loadPlugin(PluginLoader.java:75)
at org.mockito.internal.configuration.plugins.PluginLoader.loadPlugin(PluginLoader.java:49)
at org.mockito.internal.configuration.plugins.PluginRegistry.<init>(PluginRegistry.java:29)
at org.mockito.internal.configuration.plugins.Plugins.<clinit>(Plugins.java:26)
at org.mockito.internal.MockitoCore.<clinit>(MockitoCore.java:71)
at org.mockito.Mockito.<clinit>(Mockito.java:1683)
... 19 more
Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Unknown Source)
at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.mockito.internal.configuration.plugins.DefaultMockitoPlugins.create(DefaultMockitoPlugins.java:103)
... 26 more
Caused by: org.mockito.exceptions.base.MockitoInitializationException:
Could not initialize inline Byte Buddy mock maker.
It appears as if your JDK does not supply a working agent attachment mechanism.
Java : 17
JVM vendor name : JetBrains s.r.o.
JVM vendor version : 17.0.10+0-17.0.10b1087.21-11609105
JVM name : OpenJDK 64-Bit Server VM
JVM version : 17.0.10+0-17.0.10b1087.21-11609105
JVM info : mixed mode
OS name : Mac OS X
OS version : 14.5
at org.mockito.internal.creation.bytebuddy.InlineDelegateByteBuddyMockMaker.<init>(InlineDelegateByteBuddyMockMaker.java:260)
at org.mockito.internal.creation.bytebuddy.InlineByteBuddyMockMaker.<init>(InlineByteBuddyMockMaker.java:23)
... 32 more
Caused by: java.lang.IllegalStateException: Could not self-attach to current VM using external process - set a property net.bytebuddy.agent.attacher.dump to dump the process output to a file at the specified location
at net.bytebuddy.agent.ByteBuddyAgent.installExternal(ByteBuddyAgent.java:706)
at net.bytebuddy.agent.ByteBuddyAgent.install(ByteBuddyAgent.java:636)
at net.bytebuddy.agent.ByteBuddyAgent.install(ByteBuddyAgent.java:616)
at net.bytebuddy.agent.ByteBuddyAgent.install(ByteBuddyAgent.java:568)
at net.bytebuddy.agent.ByteBuddyAgent.install(ByteBuddyAgent.java:545)
at org.mockito.internal.creation.bytebuddy.InlineDelegateByteBuddyMockMaker.<clinit>(InlineDelegateByteBuddyMockMaker.java:133)
... 33 more
The text was updated successfully, but these errors were encountered:
I haven't created a ticket for these changes.
## Proposed Changes
- Fix `ResultTest.getLastResult` by ensuring that the first result
really has a start_time before the second result
- Fix `BuildConfig` warning by changing to the new configuration
- Remove the `mockito-inline` dependency, since it's no longer needed
for Mockito 5
### Context
- This PR started as an attempt to fixooni/probe#2777 but I wasn't able to do it yet
Describe the bug
Around 79 unit tests are failing when run with the
debug
build type, the usual build type used when developing the app.To Reproduce
Run
gradlew testOoniStableFullDebug
or open and run a test manually on the Android Studio UI, with a buildVariant selected that ends inDebug
.Expected behavior
Those tests should have the same result and the
release
build type, since there's no applicable difference between the 2 build types.Stacktrace
The text was updated successfully, but these errors were encountered: