[JBoss JIRA] (ISPN-12056) Some tests are failing on windows when they try to delete the SingleFileStore
by Tristan Tarrant (Jira)
[ https://issues.redhat.com/browse/ISPN-12056?page=com.atlassian.jira.plugi... ]
Tristan Tarrant updated ISPN-12056:
-----------------------------------
Status: Pull Request Sent (was: Coding In Progress)
> Some tests are failing on windows when they try to delete the SingleFileStore
> -----------------------------------------------------------------------------
>
> Key: ISPN-12056
> URL: https://issues.redhat.com/browse/ISPN-12056
> Project: Infinispan
> Issue Type: Bug
> Reporter: Gustavo Lira e Silva
> Assignee: Gustavo Lira e Silva
> Priority: Major
>
> Some tests are failing on windows with the same reason, see some examples bellow:
> {noformat}
> java.lang.IllegalStateException: Cannot delete C:\j\workspace\jdg-8.0.x-jdg-func-ispn-testsuite-win-openjdk\4964bfc5\infinispan\core\target\infinispanTempFiles\ExpirationSingleFileStoreListenerFunctionalTest\0\defaultcache.dat owner=null permissions=[]
> {noformat}
> {noformat}
> Java.lang.IllegalStateException: Cannot delete C:\j\workspace\jdg-8.0.x-jdg-func-ispn-testsuite-win-openjdk\4964bfc5\infinispan\core\target\infinispanTempFiles\AsyncStoreWithoutEvictionFunctionalTest\cache.dat owner=null permissions=[]
> at org.infinispan.commons.util.Util.recursiveDelete(Util.java:1046)
> at org.infinispan.commons.util.Util.recursiveDelete(Util.java:1032)
> at org.infinispan.commons.util.Util.recursiveFileRemove(Util.java:1022)
> at org.infinispan.commons.util.Util.recursiveFileRemove(Util.java:1011)
> at org.infinispan.persistence.support.AsyncStoreWithoutEvictionFunctionalTest.clearTempDir(AsyncStoreWithoutEvictionFunctionalTest.java:39)
> {noformat}
> {noformat}
> java.lang.IllegalStateException: Cannot delete C:\j\workspace\jdg-8.0.x-jdg-func-ispn-testsuite-win-openjdk\4964bfc5\infinispan\core\target\infinispanTempFiles\ExpirationSingleFileStoreListenerFunctionalTest\0\defaultcache.dat owner=null permissions=[]
> at org.infinispan.commons.util.Util.recursiveDelete(Util.java:1046)
> at org.infinispan.commons.util.Util.recursiveDelete(Util.java:1032)
> at org.infinispan.commons.util.Util.recursiveDelete(Util.java:1032)
> at org.infinispan.commons.util.Util.recursiveFileRemove(Util.java:1022)
> at org.infinispan.commons.util.Util.recursiveFileRemove(Util.java:1011)
> at org.infinispan.expiration.impl.ExpirationSingleFileStoreListenerFunctionalTest.clearTempDir(ExpirationSingleFileStoreListenerFunctionalTest.java:46)
> {noformat}
> First of all we should change the old {{file.delete()}} which only return a boolean for {{Files.delete(file)}} which return an exception with a valuable information in case of the file couldn't be deleted.
> The real reason for the file couldn't be delete on windows is
> {noformat}
> "the file is being used by another process"
> {noformat}
> The code bellow into {{org.infinispan.commons.util.Util#recursiveDelete}} solves the problem:
> {noformat}
> Files.walk(f.toPath())
> .sorted(Comparator.reverseOrder())
> .map(Path::toFile)
> .forEach(File::delete);
> {noformat}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years, 6 months
[JBoss JIRA] (ISPN-12059) CliIT allow external module use
by Tristan Tarrant (Jira)
[ https://issues.redhat.com/browse/ISPN-12059?page=com.atlassian.jira.plugi... ]
Tristan Tarrant updated ISPN-12059:
-----------------------------------
Status: Resolved (was: Pull Request Sent)
Fix Version/s: 11.0.1.Final
Resolution: Done
> CliIT allow external module use
> -------------------------------
>
> Key: ISPN-12059
> URL: https://issues.redhat.com/browse/ISPN-12059
> Project: Infinispan
> Issue Type: Enhancement
> Components: Test Suite
> Affects Versions: 11.0.0.Final
> Reporter: Ryan Emerson
> Assignee: Ryan Emerson
> Priority: Major
> Fix For: 11.0.1.Final
>
>
> CliIT currently loads resources via {{getResource}} and then passes the resource path to the CLI. As the CLI simply resolves these paths as normal File objects, the CLI is unable to find the files when they are located within a jar file. As a workaround we should utilise a working directory for the test and copy the resources from the jar to the local directory before passing the path to the CLI.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years, 6 months