You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Dale Emery (Jira)" <ji...@apache.org> on 2021/11/19 21:59:00 UTC
[jira] [Commented] (GEODE-9638) CI failure: DeployedJarTest getDeployedFileName failed on Windows intermittently
[ https://issues.apache.org/jira/browse/GEODE-9638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17446674#comment-17446674 ]
Dale Emery commented on GEODE-9638:
-----------------------------------
This test uses our custom Java compiler class to create jars. When the compiler finishes compiling, it deletes the temporary files it created. To delete the temporary files, it calls Apache commons `FileUtils.deleteDirectory(dir)`.
On Windows, `FileUtils` sometimes throws `DirectoryNotEmptyException` even though it has recursively removed all of `dir`'s contents before attempting to delete `dir`.
I don't know the specific cause of this. I suspect that `dir` or one of its files remains locked for a short time after `dir` is cleaned. Windows is known to refuse to delete a locked file.
I have submitted a PR to change our custom Java compiler to create its temporary files in memory, rather than 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, needsTriage, 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)