[
https://issues.apache.org/jira/browse/GROOVY-12216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18100390#comment-18100390
]
ASF GitHub Bot commented on GROOVY-12216:
-----------------------------------------
testlens-app[bot] commented on PR #2751:
URL: https://github.com/apache/groovy/pull/2751#issuecomment-5130025038
## 🚨 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 \(21,
ubuntu-latest\)](https://github.com/apache/groovy/actions/runs/30535901039/job/90849015212?pr=2751)
> :test
| Test | Runs | Flakiness |
|---|---|--:|
| InspectorTest > testMetaMethods\(\) | ❌ | 0% 🟢 |
🏷️ Commit: e95e9a15963456ff6813cdfefe17ed2e63c88a29
▶️ Tests: 48123 executed
🟡 Checks: 6/29 completed
### Test Failures
<details>
<summary><strong>InspectorTest > testMetaMethods()</strong> (:test in <a
href="https://github.com/apache/groovy/actions/runs/30535901039/job/90849015212?pr=2751">Build
and test / lts (21, ubuntu-latest)</a>)</summary>
```
org.opentest4j.AssertionFailedError: Incorrect number of methods found
examining: [addShutdownHook, any, any, asBoolean, asType, collect, collect,
collect, dump, each, eachWithIndex, every, every, find, find, findAll, findAll,
findIndexOf, findIndexOf, findIndexValues, findIndexValues, findLastIndexOf,
findLastIndexOf, findResult, findResult, findResult, findResult, getAt,
getMetaClass, getMetaPropertyValues, getProperties, grep, grep, hasProperty,
identity, inject, inject, inject, inject, inspect, invokeMethod, is, isCase,
isNotCase, iterator, metaClass, print, print, printf, printf, println, println,
println, putAt, respondsTo, respondsTo, setMetaClass, split, sprintf, sprintf,
takeIf, tap, toString, use, use, use, with, with, withMethodClosure,
withTraits, stream, sleep, sleep, macro, macro, macro, macro] ==> expected:
<75> but was: <77>
at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:601)
at groovy.inspect.InspectorTest.testMetaMethods(InspectorTest.java:187)
```
|expected|actual|
|---|---|
|<s>75</s>|<b>77</b>|
</details>
### Muted Tests
> [!NOTE]
> Checks are currently running using the configuration below.
Select tests to mute in this pull request:
🔲 InspectorTest > testMetaMethods\(\) <!
> Fat-free twins for the fold/reduce DGM methods (inject, injectAll)
> ------------------------------------------------------------------
>
> Key: GROOVY-12216
> URL: https://issues.apache.org/jira/browse/GROOVY-12216
> Project: Groovy
> Issue Type: Sub-task
> Reporter: Paul King
> Assignee: Paul King
> Priority: Major
>
> h3. Summary
> Sub-task of GROOVY-12205. Adds functional-interface twins for the fold/reduce
> family. Grouped together because they share one design decision — the
> {{BinaryOperator}} vs {{BiFunction}} choice and how it pairs with the
> {{initialValue}} overloads — so the type conventions are settled once.
> {{inject}} on {{Iterable}} already has both twins (from GROOVY-12054); this
> completes the remaining receivers.
> ({{sum}} was originally grouped here but is split out — its twin collides
> positionally with an existing {{Object initialValue}} overload; see the
> separate {{sum}} item.)
> h3. Type convention
> * No-initial-value forms (2-arg reduce): {{BinaryOperator<T>}}.
> * Initial-value forms (3-arg reduce): {{BiFunction<? super U, ? super E, ?
> extends U>}}, matching the existing {{inject(Iterable, U, BiFunction)}}.
> No collision risk: in both methods the reduce function sits in a distinct
> trailing position after any explicit {{initialValue}} parameter, so it never
> competes with the initial value for overload selection.
> h3. Methods
> ||Method||Closure overloads without a twin||Functional type||Receivers||
> |{{inject}}|8|{{BinaryOperator<T>}} (no init) / {{BiFunction<? super U, ?
> super E, ? extends U>}} (init)|no-init: Object, {{E[]}}, Collection;
> with-init: Object, Iterator, Map, {{E[]}}, Collection|
> |{{injectAll}}|5|{{BinaryOperator<T>}} (no init) / {{BiFunction}}
> (init)|no-init: Iterable, Iterator; with-init: Iterable, Iterator, Map|
> Total: 13 new overloads.
> h3. Conventions (per GROOVY-12054)
> * PECS wildcards; {{@since 6.0.0}}; inline javadoc example via {{<pre
> class="language-groovy groovyTestCase">}} cross-linking the {{Closure}}
> counterpart with {{@link}}.
> * Plain single-SAM overloads only — not {{@Incubating}}.
> h3. Compatibility
> * *{{inject}} arity*: since {{BinaryOperator<T> extends BiFunction<T,T,T>}},
> the no-init ({{BinaryOperator}}, 2-arg) and with-init ({{BiFunction}}, 3-arg)
> forms stay distinct by arity — no erasure clash, mirroring the existing
> {{Iterable}} pair.
> * Existing closure/lambda call sites unaffected; method references and typed
> functional values select the twin under {{@CompileStatic}} (GROOVY-12214).
> Only check: an existing {{@CompileStatic}} call passing a literal {{null}} to
> a currently-single-overload form would become ambiguous — grep-checkable,
> resolved with a cast if found.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)