[
https://issues.apache.org/jira/browse/GEODE-9288?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17350342#comment-17350342
]
ASF subversion and git services commented on GEODE-9288:
--------------------------------------------------------
Commit 6702402a98de98c61b71d9d017c863dc659acf0c in geode's branch
refs/heads/develop from Alberto Bustamante Reyes
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=6702402 ]
GEODE-9288: DeployedJarTest fails because JavaCompiler fails to delete temp dir
(#6501)
> DeployedJarTest fails because JavaCompiler.compile() fails to delete
> temporaryClassesDirectory
> ----------------------------------------------------------------------------------------------
>
> Key: GEODE-9288
> URL: https://issues.apache.org/jira/browse/GEODE-9288
> Project: Geode
> Issue Type: Bug
> Components: tests
> Affects Versions: 1.15.0
> Reporter: Bill Burcham
> Assignee: Alberto Bustamante Reyes
> Priority: Major
> Labels: pull-request-available
>
> DeployedJarTest.throwsIfFileIsNotValidJarFile() test failed in Windows CI
> https://concourse.apachegeode-ci.info/teams/main/pipelines/apache-develop-main/jobs/WindowsUnitTestOpenJDK11/builds/225
> The problem did not reproduce on macOS in 1000 runs.
> I notice that the JavaCompiler constructor calls the deprecated
> Files.createTempDir(). I wonder if there might be a race condition where two
> test processes (at once) think they own that temp dir and so they can both
> delete it.
> We might consider replacing that deprecated call with the recommended
> Files.createTempDirectory() which may be more robust. Looking at the
> deprecated method and the recommended substitute the latter might have less
> of a chance of collision due to its use of random suffixes (versus the
> former's monotonically-increasing ints).
> {code:java}
> org.apache.geode.deployment.internal.DeployedJarTest >
> throwsIfFileIsNotValidJarFile FAILED
> java.io.IOException: Unable to delete directory
> C:\Users\geode\AppData\Local\Temp\1621373797371-0\classes.
> at
> org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:1212)
> at
> org.apache.geode.test.compiler.JavaCompiler.compile(JavaCompiler.java:90)
> at
> org.apache.geode.test.compiler.JarBuilder.buildJarFromClassNames(JarBuilder.java:79)
> at
> org.apache.geode.deployment.internal.DeployedJarTest.createJarFile(DeployedJarTest.java:82)
> at
> org.apache.geode.deployment.internal.DeployedJarTest.throwsIfFileIsNotValidJarFile(DeployedJarTest.java:47)
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)