It seems this error is windows specific

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

**Reproduction line:**
`null`

**Applicable branches:**
master

**Reproduces locally?:**
No

**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\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-031\impl.jar: java.nio.file.FileSystemException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-031\impl.jar: The process cannot access the file because it is being used by another process
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-031: java.nio.file.DirectoryNotEmptyException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-031
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-030\foo.jar: java.nio.file.FileSystemException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-030\foo.jar: The process cannot access the file because it is being used by another process
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-030\impl.jar: java.nio.file.FileSystemException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-030\impl.jar: The process cannot access the file because it is being used by another process
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-030: java.nio.file.DirectoryNotEmptyException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-030
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-029\foo.jar: java.nio.file.FileSystemException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-029\foo.jar: The process cannot access the file because it is being used by another process
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-029\impl.jar: java.nio.file.FileSystemException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-029\impl.jar: The process cannot access the file because it is being used by another process
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-029: java.nio.file.DirectoryNotEmptyException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-029
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-028\foo.jar: java.nio.file.FileSystemException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-028\foo.jar: The process cannot access the file because it is being used by another process
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-028\impl.jar: java.nio.file.FileSystemException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-028\impl.jar: The process cannot access the file because it is being used by another process
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-028: java.nio.file.DirectoryNotEmptyException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-028
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-027\foo.jar: java.nio.file.FileSystemException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-027\foo.jar: The process cannot access the file because it is being used by another process
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-027\impl.jar: java.nio.file.FileSystemException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-027\impl.jar: The process cannot access the file because it is being used by another process
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-027: java.nio.file.DirectoryNotEmptyException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-027
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-026\foo.jar: java.nio.file.FileSystemException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-026\foo.jar: The process cannot access the file because it is being used by another process
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-026\impl.jar: java.nio.file.FileSystemException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-026\impl.jar: The process cannot access the file because it is being used by another process
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-026: java.nio.file.DirectoryNotEmptyException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-026
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-025\foo.jar: java.nio.file.FileSystemException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-025\foo.jar: The process cannot access the file because it is being used by another process
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-025\impl.jar: java.nio.file.FileSystemException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-025\impl.jar: The process cannot access the file because it is being used by another process
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-025: java.nio.file.DirectoryNotEmptyException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-025
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-024\impl.jar: java.nio.file.FileSystemException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-024\impl.jar: The process cannot access the file because it is being used by another process
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-024: java.nio.file.DirectoryNotEmptyException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-024
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-023\impl.jar: java.nio.file.FileSystemException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-023\impl.jar: The process cannot access the file because it is being used by another process
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-023: java.nio.file.DirectoryNotEmptyException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-023
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-022\impl.jar: java.nio.file.FileSystemException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-022\impl.jar: The process cannot access the file because it is being used by another process
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-022: java.nio.file.DirectoryNotEmptyException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-022
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-021\impl.jar: java.nio.file.FileSystemException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-021\impl.jar: The process cannot access the file because it is being used by another process
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-021: java.nio.file.DirectoryNotEmptyException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-021
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-020\impl.jar: java.nio.file.FileSystemException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-020\impl.jar: The process cannot access the file because it is being used by another process
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-020: java.nio.file.DirectoryNotEmptyException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-020
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-019\impl.jar: java.nio.file.FileSystemException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-019\impl.jar: The process cannot access the file because it is being used by another process
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-019: java.nio.file.DirectoryNotEmptyException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-019
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-018\impl.jar: java.nio.file.FileSystemException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-018\impl.jar: The process cannot access the file because it is being used by another process
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-018: java.nio.file.DirectoryNotEmptyException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-018
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-017\impl.jar: java.nio.file.FileSystemException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-017\impl.jar: The process cannot access the file because it is being used by another process
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-017: java.nio.file.DirectoryNotEmptyException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-017
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-016\impl.jar: java.nio.file.FileSystemException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-016\impl.jar: The process cannot access the file because it is being used by another process
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-016: java.nio.file.DirectoryNotEmptyException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-016
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-015\impl.jar: java.nio.file.FileSystemException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-015\impl.jar: The process cannot access the file because it is being used by another process
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-015: java.nio.file.DirectoryNotEmptyException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-015
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-014\impl.jar: java.nio.file.FileSystemException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-014\impl.jar: The process cannot access the file because it is being used by another process
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-014: java.nio.file.DirectoryNotEmptyException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-014
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-013\impl.jar: java.nio.file.FileSystemException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-013\impl.jar: The process cannot access the file because it is being used by another process
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-013: java.nio.file.DirectoryNotEmptyException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-013
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-012\impl.jar: java.nio.file.FileSystemException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-012\impl.jar: The process cannot access the file because it is being used by another process
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-012: java.nio.file.DirectoryNotEmptyException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-012
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-011\impl.jar: java.nio.file.FileSystemException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-011\impl.jar: The process cannot access the file because it is being used by another process
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-011: java.nio.file.DirectoryNotEmptyException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-011
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-010\impl.jar: java.nio.file.FileSystemException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-010\impl.jar: The process cannot access the file because it is being used by another process
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-010: java.nio.file.DirectoryNotEmptyException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-010
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-009\impl.jar: java.nio.file.FileSystemException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-009\impl.jar: The process cannot access the file because it is being used by another process
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-009: java.nio.file.DirectoryNotEmptyException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-009
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-008\impl.jar: java.nio.file.FileSystemException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-008\impl.jar: The process cannot access the file because it is being used by another process
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-008: java.nio.file.DirectoryNotEmptyException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-008
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-007\impl.jar: java.nio.file.FileSystemException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-007\impl.jar: The process cannot access the file because it is being used by another process
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-007: java.nio.file.DirectoryNotEmptyException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-007
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-006\impl.jar: java.nio.file.FileSystemException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-006\impl.jar: The process cannot access the file because it is being used by another process
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-006: java.nio.file.DirectoryNotEmptyException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-006
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-005\impl.jar: java.nio.file.FileSystemException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-005\impl.jar: The process cannot access the file because it is being used by another process
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-005: java.nio.file.DirectoryNotEmptyException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-005
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-004\impl.jar: java.nio.file.FileSystemException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-004\impl.jar: The process cannot access the file because it is being used by another process
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-004: java.nio.file.DirectoryNotEmptyException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-004
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-003\impl.jar: java.nio.file.FileSystemException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-003\impl.jar: The process cannot access the file because it is being used by another process
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-003: java.nio.file.DirectoryNotEmptyException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-003
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-002\impl.jar: java.nio.file.FileSystemException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-002\impl.jar: The process cannot access the file because it is being used by another process
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-002: java.nio.file.DirectoryNotEmptyException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001\tempDir-002
   C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001: java.nio.file.DirectoryNotEmptyException: C:\Users\jenkins\workspace\platform-support\86\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_36EE57C60F909609-001

  at __randomizedtesting.SeedInfo.seed([36EE57C60F909609]: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:375)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl.lambda$forkTimeoutingTask$0(ThreadLeakControl.java:831)
  at java.lang.Thread.run(Thread.java:833)

```
test/framework/src/main/java/org/elasticsearch/test/compiler/InMemoryJavaCompiler.java
* @param sources A map of class names to source code
     * @param options Additional command line options (optional)
     * @throws RuntimeException If the compilation did not succeed
     * @return A Map containing the resulting byte code from the compilation, one entry per class name
     */
    public static Map<String, byte[]> compile(Map<String, CharSequence> sources, String... options) {
        var files = sources.entrySet().stream().map(e -> new InMemoryJavaFileObject(e.getKey(), e.getValue())).toList();
        CompilationTask task = getCompilationTask(files, options);
        boolean result = privilegedCall(task::call);
        if (result == false) {
            throw new RuntimeException("Could not compile " + sources.entrySet().stream().toList());
        }
        return files.stream().collect(Collectors.toMap(InMemoryJavaFileObject::getClassName, InMemoryJavaFileObject::getByteCode));
    }
    /**
     * Compiles the class with the given name and source code.
     *
     * @param className The name of the class
     * @param sourceCode The source code for the class with name {@code className}
     * @param options Additional command line options (optional)
     * @throws RuntimeException If the compilation did not succeed
     * @return The resulting byte code from the compilation
     */
    public static byte[] compile(String className, CharSequence sourceCode, String... options) {
        InMemoryJavaFileObject file = new InMemoryJavaFileObject(className, sourceCode);
        CompilationTask task = getCompilationTask(file, options);
        boolean result = privilegedCall(task::call);
        if (result == false) {
            throw new RuntimeException("Could not compile " + className + " with source code " + sourceCode);
        }