[ 
https://issues.apache.org/jira/browse/GROOVY-12303?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18108381#comment-18108381
 ] 

ASF GitHub Bot commented on GROOVY-12303:
-----------------------------------------

testlens-app[bot] commented on PR #2834:
URL: https://github.com/apache/groovy/pull/2834#issuecomment-5427892409

   ## 🚨 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/32985013449/job/98229694748?pr=2834)
 > :test
   
   | Test | Runs | Flakiness |
   |---|---|--:|
   | ClassNodeResolverTest > nonFileSourceUrlUsesUrlConnectionForFreshness\(\) 
| ❌ | 0% 🟢 |
   
   🏷️ Commit: 00f7e317c471763dd13b0d27af9beefd0f4dee97
   ▶️ Tests:  110633 executed
   🟡 Checks: 26/29 completed
   
   ### Test Failures
   
   <details>
   
   <summary><strong>ClassNodeResolverTest > 
nonFileSourceUrlUsesUrlConnectionForFreshness()</strong> (:test in <a 
href="https://github.com/apache/groovy/actions/runs/32985013449/job/98229694748?pr=2834";>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)
        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-8008533645020223393. The following 
paths could not be deleted (see suppressed exceptions for details): <root>, 
sources.jar
        Suppressed: java.nio.file.DirectoryNotEmptyException: 
C:\Users\RUNNER~1\AppData\Local\Temp\junit-8008533645020223393
                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)
                at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
        Suppressed: java.nio.file.FileSystemException: 
C:\Users\RUNNER~1\AppData\Local\Temp\junit-8008533645020223393\sources.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)
                at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
                Suppressed: java.nio.file.FileSystemException: 
C:\Users\RUNNER~1\AppData\Local\Temp\junit-8008533645020223393\sources.jar: The 
process cannot access the file because it is being used by another process
                        ... 21 more
   ```
   
   </details>
   
   ### Rerun Controls
   > [!NOTE]
   > Checks are currently running using the configuration below.
   
   Select tests to mute in this pull request:
   
   🔲 ClassNodeResolverTest > nonFileSourceUrlUsesUrlConnectionForFreshness\(\) 
<!

> ClassNodeResolver: NoClassDefFoundError during class-loader lookup aborts 
> resolution
> ------------------------------------------------------------------------------------
>
>                 Key: GROOVY-12303
>                 URL: https://issues.apache.org/jira/browse/GROOVY-12303
>             Project: Groovy
>          Issue Type: Bug
>            Reporter: Daniel Sun
>            Priority: Major
>
> When class-loader lookup is used ({{{}asmResolving{}}} off, or the type 
> exists only in memory), {{ClassNodeResolver}} calls 
> {{{}GroovyClassLoader.loadClass{}}}. If the requested class *exists* but 
> cannot be linked (missing superclass or interface), the JVM throws 
> {{{}NoClassDefFoundError{}}}.
> That error used to escape resolution. Compilation aborted with an {{Error}} 
> that named the {*}missing dependency{*}, not the type being resolved. 
> {{resolveName}} could also cache the name as a miss ({{{}NO_CLASS{}}}), so a 
> later successful compile of the dependency would not be retried.
> A TODO in {{findByClassLoading}} has noted this since the 2012 split out of 
> {{{}ResolveVisitor{}}}.
> h3. Expected
>  * If bytecode for the requested name is still on the class path, decompile 
> it (ASM does not link) and continue.
>  * Else if a groovy source of the same name is available, add it to the 
> compilation queue.
>  * Else if a {{.class}} resource exists for that path but declares a 
> different binary name (JVM {{defineClass}} name check; also case-insensitive 
> filesystems), treat the lookup as a miss. Detect this from the bytecode name, 
> not from {{NoClassDefFoundError}} text (HotSpot's {{wrong name}} phrase is 
> English-only; OpenJ9 does not use it).
>  * Otherwise rethrow {{NoClassDefFoundError}} with the looked-up name in the 
> message, and do not cache {{{}NO_CLASS{}}}.
> h3. Actual
> {{NoClassDefFoundError}} propagated out of 
> {{{}ClassNodeResolver.findByClassLoading{}}}.
> h3. Reproducer
> Put {{HasDep.class}} (extends a type that is not loadable) on the class path, 
> disable ASM resolving, and compile:
> {code:groovy}
> HasDep x = null
> {code}
> This fails with {{NoClassDefFoundError}} for the missing super-type instead 
> of resolving {{{}HasDep{}}}.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to