[
https://issues.apache.org/jira/browse/GROOVY-12036?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18084052#comment-18084052
]
ASF GitHub Bot commented on GROOVY-12036:
-----------------------------------------
testlens-app[bot] commented on PR #2558:
URL: https://github.com/apache/groovy/pull/2558#issuecomment-4562567580
## 🚨 TestLens detected 1 failed test 🚨
Here is what you can do:
1) Inspect the test failures carefully.
2) If you are convinced that some of the tests are flaky, you can mute them
below.
3) Finally, trigger a rerun by checking the rerun checkbox.
### Test Summary
| Check | Project/Task | Test | Runs |
|---|---|---|---|
| [Build and test / lts \(17, windows-latest,
1\)](https://github.com/apache/groovy/actions/runs/26565045614/job/78257420964?pr=2558)
| :test | GenericsSTCTest > testMockito\(\) | ❌ |
🏷️ Commit: 8cb32be00865c8f77e6614b3f661002953d1a4c8
▶️ Tests: 88139 executed
🟡 Checks: 18/28 completed
### Test Failures
<details>
<summary><strong>GenericsSTCTest > testMockito()</strong> (:test in <a
href="https://github.com/apache/groovy/actions/runs/26565045614/job/78257420964?pr=2558">Build
and test / lts (17, windows-latest, 1)</a>)</summary>
```
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:84)
at jdk.proxy14/jdk.proxy14.$Proxy87.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:267)
at
org.mockito.internal.creation.MockSettingsImpl.build(MockSettingsImpl.java:234)
at org.mockito.internal.MockitoCore.mock(MockitoCore.java:86)
at org.mockito.Mockito.mock(Mockito.java:2037)
at org.mockito.Mockito.mock(Mockito.java:1952)
at
TestScripte7658f57482b45c5b1a8732651ec81b9.run(TestScripte7658f57482b45c5b1a8732651ec81b9.groovy:12)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:553)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:588)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:572)
at
groovy.transform.stc.StaticTypeCheckingTestCase.assertScript(StaticTypeCheckingTestCase.groovy:78)
at
groovy.transform.stc.GenericsSTCTest.testMockito(GenericsSTCTest.groovy:5962)
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:97)
at
org.mockito.internal.configuration.plugins.DefaultMockitoPlugins.getDefaultPlugin(DefaultMockitoPlugins.java:71)
at
org.mockito.internal.configuration.plugins.PluginLoader.loadPlugin(PluginLoader.java:75)
at
org.mockito.internal.configuration.plugins.PluginLoader.loadPlugin(PluginLoader.java:50)
at
org.mockito.internal.configuration.plugins.PluginRegistry.<init>(PluginRegistry.java:27)
at
org.mockito.internal.configuration.plugins.Plugins.<clinit>(Plugins.java:22)
at org.mockito.internal.MockitoCore.<clinit>(MockitoCore.java:73)
at org.mockito.Mockito.<clinit>(Mockito.java:1669)
at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized0(Native
Method)
at
java.base/jdk.internal.misc.Unsafe.ensureClassInitialized(Unsafe.java:1155)
at
java.base/java.lang.invoke.DirectMethodHandle$EnsureInitialized.computeValue(DirectMethodHandle.java:377)
at
java.base/java.lang.invoke.DirectMethodHandle$EnsureInitialized.computeValue(DirectMethodHandle.java:374)
at java.base/java.lang.ClassValue.getFromHashMap(ClassValue.java:228)
at java.base/java.lang.ClassValue.getFromBackup(ClassValue.java:210)
at java.base/java.lang.ClassValue.get(ClassValue.java:116)
at
java.base/java.lang.invoke.DirectMethodHandle.checkInitialized(DirectMethodHandle.java:400)
at
java.base/java.lang.invoke.DirectMethodHandle.ensureInitialized(DirectMethodHandle.java:388)
at
java.base/java.lang.invoke.DirectMethodHandle.internalMemberNameEnsureInit(DirectMethodHandle.java:338)
... 6 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(NativeConstructorAccessorImpl.java:77)
at
java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at
java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
at
java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
at
org.mockito.internal.configuration.plugins.DefaultMockitoPlugins.create(DefaultMockitoPlugins.java:95)
... 23 more
Caused by: org.mockito.exceptions.base.MockitoInitializationException:
It seems like you are running Mockito with an incomplete or inconsistent
class path. Byte Buddy could not be loaded.
Byte Buddy is available on Maven Central as 'net.bytebuddy:byte-buddy' with
the module name 'net.bytebuddy'.
For the inline mock maker, 'net.bytebuddy:byte-buddy-agent' with the module
name 'net.bytebuddy.agent' is also required.
Normally, your IDE or build tool (such as Maven or Gradle) should take care
of your class path completion but
at
org.mockito.internal.exceptions.Reporter.missingByteBuddyDependency(Reporter.java:1131)
at
org.mockito.internal.creation.bytebuddy.ByteBuddyMockMaker.<init>(ByteBuddyMockMaker.java:31)
... 29 more
Caused by: java.lang.NoClassDefFoundError:
net/bytebuddy/utility/GraalImageCode
at
org.mockito.internal.creation.bytebuddy.SubclassInjectionLoader.<init>(SubclassInjectionLoader.java:34)
at
org.mockito.internal.creation.bytebuddy.SubclassByteBuddyMockMaker.<init>(SubclassByteBuddyMockMaker.java:33)
at
org.mockito.internal.creation.bytebuddy.ByteBuddyMockMaker.<init>(ByteBuddyMockMaker.java:29)
... 29 more
Caused by: java.lang.ClassNotFoundException:
net.bytebuddy.utility.GraalImageCode
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:592)
at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:689)
at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:651)
at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:639)
... 32 more
```
</details>
### Muted Tests
> [!NOTE]
> Checks are currently running using the configuration below.
Select tests to mute in this pull request:
🔲 GenericsSTCTest > testMockito\(\) <!
> GDK: cache Collectors instances in StreamGroovyMethods and
> ParallelCollectionExtensions
> ---------------------------------------------------------------------------------------
>
> Key: GROOVY-12036
> URL: https://issues.apache.org/jira/browse/GROOVY-12036
> Project: Groovy
> Issue Type: Improvement
> Reporter: Paul King
> Assignee: Paul King
> Priority: Major
>
> Cache Collectors.toList() and Collectors.toSet() as static singletons in
> StreamGroovyMethods and ParallelCollectionExtensions, eliminating per-call
> collector allocation in 9 GDK call sites.
> A benefit in Eclipse Collections as noted here:
> https://donraab.medium.com/counting-and-collecting-collectors-d69b7c9aaca0
> Groovy is not a collections library but this is a very minor improvement with
> no downside.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)