Hi Eric,

the maven indexer or lucene writer/searcher is still accessing the index files, even if the maven indexing context is closed. Getting to the real cause is really difficult, because our maven indexer is using a shadowed lucene version. In the end I fixed the tests by using a unique index directory for each test. I think several failed tests on windows are caused by the open index files, but I don't have a better solution than using unique directories
for these tests.



Regards

Martin




On 24.02.20 18:01, Martin Stockhammer wrote:
Hi Eric,

the maven indexer uses the indexer classes from the maven libraries and I'm not sure, if the access to the index folder can be properly closed. Maybe a unique index directory for each test can help to fix this, or as you mentioned a repo copy for each test (but this may slow down our build).

Let me have a look at this class. I will try out some changes.

Regards

Martin

On 21.02.20 11:44, Eric Barboni wrote:
Hi,


For example in archiva-maven-indexer


MavenIndexManagerTest cannot delete recursive using archiva fileutils. Accesdenied seems to be the root cause.


Error during recursive delete of E:\jj\workspace\a\archiva-modules\archiva-maven\archiva-maven-indexer\target\repositories\test-repo\.index-test


Maybe insuring each test on his own repo can be a solution


Best Regards

Eric




De : Martin Stockhammer <marti...@apache.org>
Envoyé : jeudi 20 février 2020 17:58
À : dev@archiva.apache.org; Eric Barboni <sk...@apache.org>
Objet : RE: Test fails( on Windows)


Hi Eric,

do the filelock related fails only occur in the filelock module, or do they occur in other modules too? If the former, we should focus on the deletion issues. File locking on Windows is always good for headaches :-/ and we should keep them for later.

About file deletion fails:
Do you have examples? I think we should use our FileUtils.deleteQuietly() for deletion in all unit tests. And maybe improve the util method as necessary (add a delete on vm shutdown)

If file deletion in production methods does not work, I need concrete examples. My windows system here is very limited. I can only use it for simple test cases, no chance to build the whole archiva stack on it.

Thank you and regards

Martin






Am 20. Februar 2020 14:47:45 MEZ schrieb Eric Barboni < <mailto:sk...@apache.org> sk...@apache.org>:

Hi Martin,
  Others test issues are more difficult to handle (about 350).

   Deletion is almost impossible due to access denied, still locked file.
The stress test is failing a lot of time
  org.apache.archiva.common.filelock.DefaultFileLockManagerTest.testWrite
org.apache.archiva.common.filelock.DefaultFileLockManager.writeFileLock(DefaultFileLockManager.java:222)
  cannot access to file, used by another processus

Regards
Eric

-----Message d'origine-----
De : Martin Stockhammer < <mailto:marti...@apache.org> marti...@apache.org>
Envoyé : vendredi 14 février 2020 08:37
À :  <mailto:dev@archiva.apache.org> dev@archiva.apache.org
Objet : Re: Test fails( on Windows)

Hi Eric,

sorry, I missed your last mail about the filelock issue. I will check the PR today.

Regards

Martin

On 14.02.20 01:09, Eric Barboni wrote:

Hi,
   Jumping late in the conversation for the failing test on windows.



Reply via email to