[
https://issues.apache.org/jira/browse/GEODE-9638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17450725#comment-17450725
]
ASF subversion and git services commented on GEODE-9638:
--------------------------------------------------------
Commit e3a0af3fd7580305014bc2406ed139a1c0e7bec9 in geode's branch
refs/heads/develop from Dale Emery
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=e3a0af3 ]
GEODE-9638: Make test compiler not use files (#7133)
Fix `DeployedJarTest`, which intermittently throws
`DirectoryNotEmptyException` on Windows.
PROBLEM
`DeployedJarTest` uses Geode's custom Java compiler to create jar files.
When the compiler finishes compiling, it calls Apache commons
`FileUtils.deleteDirectory(dir)` to delete the temporary files it
created during compilation.
`FileUtils.deleteDirectory(dir)` first "cleans" `dir` by recursively
removing all files from it, then deletes `dir` itself. On Windows,
deleting `dir` sometimes throws `DirectoryNotEmptyException` even though
`FileUtils` has cleaned the directory. I do not know the cause of this.
SOLUTION
Change our custom Java compiler to create temporary files in memory
instead of on the file system. That way there are no file system files
to delete.
> CI failure: DeployedJarTest getDeployedFileName failed on Windows
> intermittently
> ---------------------------------------------------------------------------------
>
> Key: GEODE-9638
> URL: https://issues.apache.org/jira/browse/GEODE-9638
> Project: Geode
> Issue Type: Bug
> Components: core
> Affects Versions: 1.15.0
> Reporter: Darrel Schneider
> Assignee: Dale Emery
> Priority: Major
> Labels: GeodeOperationAPI, flaky, pull-request-available
>
> org.apache.geode.deployment.internal.DeployedJarTest > getDeployedFileName
> FAILED
> java.nio.file.DirectoryNotEmptyException:
> C:\Users\geode\AppData\Local\Temp\javaCompiler2976436474406314797\classes
> at
> sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:266)
> at
> sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103)
> at java.nio.file.Files.delete(Files.java:1126)
> at org.apache.commons.io.FileUtils.delete(FileUtils.java:1175)
> at
> org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:1194)
> at
> org.apache.geode.test.compiler.JavaCompiler.compile(JavaCompiler.java:91)
> at
> org.apache.geode.test.compiler.JarBuilder.buildJarFromClassNames(JarBuilder.java:83)
> at
> org.apache.geode.deployment.internal.DeployedJarTest.createJarFile(DeployedJarTest.java:82)
> at
> org.apache.geode.deployment.internal.DeployedJarTest.getDeployedFileName(DeployedJarTest.java:65)
> see:
> https://concourse.apachegeode-ci.info/teams/main/pipelines/apache-develop-main/jobs/windows-unit-test-openjdk8/builds/206
--
This message was sent by Atlassian Jira
(v8.20.1#820001)