[ 
https://issues.apache.org/jira/browse/LUCY-280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14624519#comment-14624519
 ] 

Nick Wellnhofer commented on LUCY-280:
--------------------------------------

I found out that it's the Windows Search Service causing all the problems. 
After excluding the Lucy directory under Indexing Options, I ran the test suite 
about 50 times without any errors. Unfortunately, the 
`FILE_ATTRIBUTE_NOT_CONTENT_INDEXED` attribute doesn't seem to help.

> Test suite failures because of Windows file deletion semantics
> --------------------------------------------------------------
>
>                 Key: LUCY-280
>                 URL: https://issues.apache.org/jira/browse/LUCY-280
>             Project: Lucy
>          Issue Type: Bug
>          Components: Store
>    Affects Versions: 0.4.2
>            Reporter: Nick Wellnhofer
>            Priority: Minor
>
> There are at least two tests that fail randomly on Windows due to non-POSIX 
> file deletion semantics. The problem is that Windows doesn't guarantee that a 
> file is deleted immediately if there's another open handle on the file. (I'm 
> still not sure what other processes open handles on random files. It might be 
> virus scanners, but there are also sources that claim that internal Windows 
> services like the Volume Shadow Copy Service are responsible.)
> It's possible that only the test suite is affected but I'd prefer a global 
> solution to this problem. I think the best approach is to do something like 
> Cygwin: instead of deleting a file, move it to the recycle bin and set the 
> delete-on-close flag. Unfortunately, it's rather complicated to implement 
> this properly. See the [Cygwin source 
> code|https://github.com/mirror/cygwin/blob/master/winsup/cygwin/syscalls.cc], 
> functions {{unlink_nt}} and {{try_to_bin}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to