[
https://issues.apache.org/jira/browse/GROOVY-12218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18100451#comment-18100451
]
ASF GitHub Bot commented on GROOVY-12218:
-----------------------------------------
testlens-app[bot] commented on PR #2752:
URL: https://github.com/apache/groovy/pull/2752#issuecomment-5131706836
## 🚨 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
#### [Build and test / lts \(17, windows-latest,
1\)](https://github.com/apache/groovy/actions/runs/30539812822/job/90878485501?pr=2752)
> :test
| Test | Runs | Flakiness |
|---|---|--:|
| ClassTagExtensionModuleTest | 🚫 ❌ | 23% 🔴 |
🏷️ Commit: cdec5bfc86e25b4a449770f5ff2fe6bad1a3e789
▶️ Tests: 21595 executed
⚪️ Checks: 31/31 completed
### Test Failures
<details>
<summary><strong>ClassTagExtensionModuleTest</strong> (:test in <a
href="https://github.com/apache/groovy/actions/runs/30539812822/job/90878485501?pr=2752">Build
and test / lts (17, windows-latest, 1)</a>)</summary>
```
org.junit.platform.commons.JUnitException: Failed to close extension context
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
Caused by:
org.junit.jupiter.api.io.TempDirDeletionStrategy$DeletionException: Failed to
delete temp directory
C:\Users\RUNNER~1\AppData\Local\Temp\junit-4423274253806803310. The following
paths could not be deleted (see suppressed exceptions for details): <root>,
classtag-module-test.jar
Suppressed: java.nio.file.DirectoryNotEmptyException:
C:\Users\RUNNER~1\AppData\Local\Temp\junit-4423274253806803310
at
java.base/sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:272)
at
java.base/sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:105)
at java.base/java.nio.file.Files.delete(Files.java:1152)
at java.base/java.nio.file.Files.walkFileTree(Files.java:2828)
at java.base/java.nio.file.Files.walkFileTree(Files.java:2882)
at
java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at
java.base/java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:395)
at
java.base/java.util.stream.Sink$ChainedReference.end(Sink.java:258)
at
java.base/java.util.stream.Sink$ChainedReference.end(Sink.java:258)
at
java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:510)
at
java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at
java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
at
java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
at
java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at
java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
Suppressed: java.nio.file.FileSystemException:
C:\Users\RUNNER~1\AppData\Local\Temp\junit-4423274253806803310\classtag-module-test.jar:
The process cannot access the file because it is being used by another process
at
java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:92)
at
java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
at
java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)
at
java.base/sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:275)
at
java.base/sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:105)
at java.base/java.nio.file.Files.delete(Files.java:1152)
at java.base/java.nio.file.Files.walkFileTree(Files.java:2811)
at java.base/java.nio.file.Files.walkFileTree(Files.java:2882)
at
java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at
java.base/java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:395)
at
java.base/java.util.stream.Sink$ChainedReference.end(Sink.java:258)
at
java.base/java.util.stream.Sink$ChainedReference.end(Sink.java:258)
at
java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:510)
at
java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at
java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
at
java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
at
java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at
java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
Suppressed: java.nio.file.FileSystemException:
C:\Users\RUNNER~1\AppData\Local\Temp\junit-4423274253806803310\classtag-module-test.jar:
The process cannot access the file because it is being used by another process
... 20 more
```
</details>
### Muted Tests
Select tests to mute in this pull request:
- [ ] ClassTagExtensionModuleTest <!
> Complete fat-free (functional-interface) twins for the array (`T[]`) forms of
> the GROOVY-12054 DGM methods
> ----------------------------------------------------------------------------------------------------------
>
> Key: GROOVY-12218
> URL: https://issues.apache.org/jira/browse/GROOVY-12218
> Project: Groovy
> Issue Type: Sub-task
> Reporter: Paul King
> Priority: Major
>
> h3. Summary
> GROOVY-12054 added {{java.util.function}} twins beside the Closure overloads
> of the core higher-order DGM methods, but only in {{DefaultGroovyMethods}} —
> the array-receiver forms in {{ArrayGroovyMethods}} were left with only their
> {{Closure}} overloads. This completes the object-array ({{T[]}}) twins so
> array receivers reach parity with the collection receivers. Each twin simply
> delegates to the corresponding DGM {{Iterable}}/{{Iterator}} twin (already
> shipped in GROOVY-12054) via {{ArrayIterable}}/{{ArrayIterator}}, following
> the array pattern established in GROOVY-12215 / GROOVY-12216.
> Already covered (not in scope): {{each}} on primitive arrays already has
> {{Consumer}}/{{IntConsumer}}/etc. twins; {{collectEntries}} already has the
> two-{{Function}} {{(keyTransform, valueTransform)}} forms; and the array
> forms of
> {{groupBy}}/{{collectMany}}/{{countBy}}/{{split}}/{{takeWhile}}/{{dropWhile}}
> (GROOVY-12215) and {{inject}}/{{injectAll}} (GROOVY-12216) are done.
> h3. Object-array twins to add
> ||Method (array form)||Count||Functional type||
> |{{each(T[])}}|1|{{Consumer<? super T>}}|
> |{{eachWithIndex(T[])}}|1|{{ObjIntConsumer<? super T>}}|
> |{{collect(T[])}}, {{collect(T[], Collection collector)}}|2|{{Function<?
> super E, ? extends T>}}|
> |{{collectEntries(T[])}}, {{collectEntries(T[], Map
> collector)}}|2|{{Function<? super E, ? extends Map.Entry<K, V>>}}|
> |{{any(T[])}}|1|{{Predicate<? super T>}}|
> |{{every(T[])}}|1|{{Predicate<? super T>}}|
> |{{find(T[])}}|1|{{Predicate<? super T>}}|
> |{{findAll(T[])}}|1|{{Predicate<? super T>}}|
> |{{count(T[])}}|1|{{Predicate<? super T>}}|
> Total: 11 object-array twins.
> h3. Primitive-array predicates (decision needed)
> {{any}}/{{every}}/{{count}} on primitive arrays currently take only a
> {{Closure}}. The JDK provides
> {{IntPredicate}}/{{LongPredicate}}/{{DoublePredicate}} but no
> {{Byte}}/{{Char}}/{{Short}}/{{Float}} predicate, so only
> {{int[]}}/{{long[]}}/{{double[]}} can be covered cleanly (3 receivers x 3
> methods = 9 twins); the other four primitive types would be inconsistent
> (widening to {{IntPredicate}} is ugly). *Options:* (a) add the 9
> well-supported primitive twins; (b) skip primitives for predicates and cover
> only {{T[]}}. Recommendation: match how {{each}}'s primitive twins already
> exist only where a JDK SAM fits — i.e. option (a) if primitive predicate
> ergonomics are wanted, else (b).
> h3. Exclusions
> * {{eachWithIndex}} on primitive arrays — no JDK {{(primitive, int)}} SAM, so
> only the {{T[]}} form ({{ObjIntConsumer}}) is clean.
> * The {{@Incubating}} right-curry {{(BiXxx, param)}} array forms —
> GROOVY-12054 added these for {{Iterable}}/{{Iterator}} but not arrays;
> deferred as a separate item.
> h3. Conventions (per GROOVY-12054)
> PECS wildcards; {{@since 6.0.0}}; javadoc {{<pre class="language-groovy
> groovyTestCase">}} example cross-linking the {{Closure}} counterpart via
> {{@link}}; plain SAM overloads (not {{@Incubating}}); bodies delegate to the
> existing DGM twins.
> h3. Compatibility
> Existing closure/lambda call sites are unaffected; method references and
> typed functional values select the new twins under {{@CompileStatic}}
> (GROOVY-12214). The only check is an existing {{@CompileStatic}} call passing
> a literal {{null}} to a currently-single-overload array method — rare and
> grep-checkable, resolved with a cast if found.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)