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

Luc Vanlerberghe commented on LUCENENET-484:
--------------------------------------------

TestStressLocks and TestStressLocksNativeFSLockFactory fail intermittently due 
to an UnauthorizedAccessException in NativeFSLockFactory.Obtain
In the code it is actually described that on Windows you can get intermittent 
"Access Denied" exceptions and the java version handles them properly.

*BUT*: in java, the "Access Denied" raises an IOException, whereas in .Net this 
raises an UnauthorizedAccessException

So the solution is to add an identical catch block for the 
UnauthorizedAccessException.
This will cause the lock obtain to simply fail and the calling methods to retry.

                
> Some possibly major tests intermittently fail 
> ----------------------------------------------
>
>                 Key: LUCENENET-484
>                 URL: https://issues.apache.org/jira/browse/LUCENENET-484
>             Project: Lucene.Net
>          Issue Type: Bug
>          Components: Lucene.Net Core, Lucene.Net Test
>    Affects Versions: Lucene.Net 3.0.3
>         Environment: All
>            Reporter: Christopher Currens
>             Fix For: Lucene.Net 3.0.3
>
>         Attachments: Lucenenet-484-NativeFSLockFactory.patch, 
> Lucenenet-484-WeakDictionary.patch, Lucenenet-484-WeakDictionaryTests.patch
>
>
> These tests will fail intermittently in Debug or Release mode, in the core 
> test suite:
> # -Lucene.Net.Index:-
> #- -TestConcurrentMergeScheduler.TestFlushExceptions-
> # Lucene.Net.Store:
> #- TestLockFactory.TestStressLocks
> # Lucene.Net.Search:
> #- TestSort.TestParallelMultiSort
> # -Lucene.Net.Util:-
> #- -TestFieldCacheSanityChecker.TestInsanity1-
> #- -TestFieldCacheSanityChecker.TestInsanity2-
> #- -(It's possible all of the insanity tests fail at one point or another)-
> # -Lucene.Net.Support-
> #- -TestWeakHashTableMultiThreadAccess.Test-
> TestWeakHashTableMultiThreadAccess should be fine to remove along with the 
> WeakHashTable in the Support namespace, since it's been replaced with 
> WeakDictionary.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to