Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing Tests: TestTermVectorsWriter::TestTermVectorCorruption() and TestIndexWriterReader::TestDuringAddIndexes() #356

Closed
NightOwl888 opened this issue Sep 27, 2020 · 0 comments · Fixed by #357
Assignees

Comments

@NightOwl888
Copy link
Contributor

The following tests are occasionally failing on macOS and Linux (see #269):

  1. Lucene.Net.Index.TestTermVectorsWriter::TestTermVectorCorruption()
  2. Lucene.Net.Index.TestIndexWriterReader::TestDuringAddIndexes()

The failure is due to the fact that the Lucene.Net.Store.SharingNativeFSLock keeps a tracking FileStream open on the file, but does not specify FileAccess.Read on that stream. A second stream is opened in IsLocked() to determine whether a lock is held, in this second case FileAccess.Read is required to provoke an exception.

Not allowing read access on the tracking stream makes RAMDirectory fail when it attempts to copy all of the files in the source directory, which is what is causing each of the above tests to fail.

@NightOwl888 NightOwl888 added this to the 4.8.0-beta00013 milestone Sep 27, 2020
@NightOwl888 NightOwl888 self-assigned this Sep 27, 2020
NightOwl888 added a commit to NightOwl888/lucenenet that referenced this issue Sep 27, 2020
…h as RAMDirectory) to read the lock file, only set file sharing to None in IsLocked() to provoke the sharing exception. Fixes apache#356.
NightOwl888 added a commit that referenced this issue Sep 27, 2020
…h as RAMDirectory) to read the lock file, only set file sharing to None in IsLocked() to provoke the sharing exception. Fixes #356.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment