apache / apache/lucene

Randomize lockfactories in tests [LUCENE-6509]

Open
#7,568 0 comments 0 reactions 0 assignees View on GitHub
legacy-jira-priority:Major type:bug
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

Today we don't do this, and it can be annoying for tests (see LUCENE-6507).

But we should randomize between NIO/Simple. LuceneTestCase can "remember" which ones have been assigned and prevent the issue of opening IW with NIO and then making a new dir over the same path with simple and confusing the test.

---
Migrated from [LUCENE-6509](https://issues.apache.org/jira/browse/LUCENE-6509) by Robert Muir (@rmuir)

Contributor guide

Open the contributing guide

Research direction

Start by reading LuceneTestCase and the existing NIO/Simple lock factory selection, then review LUCENE-6507 for the failure mode. Done means tests randomize between NIO and Simple while preventing conflicting lock-factory assignments for the same path.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
search
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.