Looks like https://github.com/elastic/elasticsearch/issues/86382 but that should have been fixed in May.

**Build scan:**
https://gradle-enterprise.elastic.co/s/xb7cxwzdk6es6/tests/:libs:elasticsearch-core:test/org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests/classMethod

**Reproduction line:**
`null`

**Applicable branches:**
main

**Reproduces locally?:**
Didn't try

**Failure history:**
https://gradle-enterprise.elastic.co/scans/tests?tests.container=org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests&tests.test=classMethod

**Failure excerpt:**
```
java.io.IOException: Could not remove the following files (in the order of attempts):
   C:\Users\jenkins\workspace\platform-support\253\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_E8BB9E0290B7F7A7-001\testResourcesParentNonPkgName-001\parent.jar: java.nio.file.FileSystemException: C:\Users\jenkins\workspace\platform-support\253\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_E8BB9E0290B7F7A7-001\testResourcesParentNonPkgName-001\parent.jar: The process cannot access the file because it is being used by another process
   C:\Users\jenkins\workspace\platform-support\253\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_E8BB9E0290B7F7A7-001\testResourcesParentNonPkgName-001: java.nio.file.DirectoryNotEmptyException: C:\Users\jenkins\workspace\platform-support\253\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_E8BB9E0290B7F7A7-001\testResourcesParentNonPkgName-001
   C:\Users\jenkins\workspace\platform-support\253\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_E8BB9E0290B7F7A7-001\testResourcesParentJavaPkgName-001\parent.jar: java.nio.file.FileSystemException: C:\Users\jenkins\workspace\platform-support\253\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_E8BB9E0290B7F7A7-001\testResourcesParentJavaPkgName-001\parent.jar: The process cannot access the file because it is being used by another process
   C:\Users\jenkins\workspace\platform-support\253\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_E8BB9E0290B7F7A7-001\testResourcesParentJavaPkgName-001: java.nio.file.DirectoryNotEmptyException: C:\Users\jenkins\workspace\platform-support\253\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_E8BB9E0290B7F7A7-001\testResourcesParentJavaPkgName-001
   C:\Users\jenkins\workspace\platform-support\253\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_E8BB9E0290B7F7A7-001: java.nio.file.DirectoryNotEmptyException: C:\Users\jenkins\workspace\platform-support\253\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_E8BB9E0290B7F7A7-001

  at __randomizedtesting.SeedInfo.seed([E8BB9E0290B7F7A7]:0)
  at org.apache.lucene.util.IOUtils.rm(IOUtils.java:341)
  at org.apache.lucene.tests.util.TestRuleTemporaryFilesCleanup.afterAlways(TestRuleTemporaryFilesCleanup.java:209)
  at com.carrotsearch.randomizedtesting.rules.TestRuleAdapter$1.afterAlways(TestRuleAdapter.java:31)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:43)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at org.apache.lucene.tests.util.TestRuleAssertionsRequired$1.evaluate(TestRuleAssertionsRequired.java:53)
  at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
  at org.apache.lucene.tests.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:44)
  at org.apache.lucene.tests.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:60)
  at org.apache.lucene.tests.util.TestRuleIgnoreTestSuites$1.evaluate(TestRuleIgnoreTestSuites.java:47)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:390)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl.lambda$forkTimeoutingTask$0(ThreadLeakControl.java:850)
  at java.lang.Thread.run(Thread.java:833)

```
libs/core/src/test/java/org/elasticsearch/core/internal/provider/EmbeddedImplClassLoaderTests.java
assertThat(c, is(java.lang.Object.class));
            assertThat(c.getClassLoader(), not(equalTo(embedLoader)));
            
            expectThrows(CNFE, () -> embedLoader.loadClass("a.b.c.Unknown"));
            assertThat(embedLoader.getResource("a/b/c/Unknown.class"), nullValue());
            assertThat(embedLoader.getResources("a/b/c/Unknown.class").hasMoreElements(), is(false));
            assertThat(embedLoader.getResourceAsStream("a/b/c/Unknown.class"), nullValue());
            assertThat(embedLoader.resources("a/b/c/Unknown.class").toList(), emptyCollectionOf(URL.class));
            
            expectThrows(NPE, () -> embedLoader.getResource(null));
            expectThrows(NPE, () -> embedLoader.getResources(null));
            expectThrows(NPE, () -> embedLoader.getResourceAsStream(null));
            expectThrows(NPE, () -> embedLoader.resources(null));
            expectThrows(NPE, () -> embedLoader.loadClass(null));
        } finally {
            PrivilegedOperations.closeURLClassLoader(parent);
        }
    }
    /*
     * Tests class loading with dependencies across multiple embedded jars.
     */
    public void testLoadWithJarDependencies() throws Exception {
        Map<String, CharSequence> sources = new HashMap<>();
        sources.put("p.Foo", "package p; public class Foo extends q.Bar { }");
        sources.put("q.Bar", "package q; public class Bar extends r.Baz { }");
        sources.put("r.Baz", "package r; public class Baz { }");
        var classToBytes = InMemoryJavaCompiler.compile(sources);
        Map<String, byte[]> jarEntries = new HashMap<>();
        jarEntries.put("IMPL-JARS/blah/LISTING.TXT", "foo.jar\nbar.jar\nbaz.jar".getBytes(UTF_8));
        jarEntries.put("IMPL-JARS/blah/foo.jar/p/Foo.class", classToBytes.get("p.Foo"));