fail tests on threadlocal leaks [LUCENE-6335]
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 1.4k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 88
Description
I know this requires us to do things like close our Analyzers in tests, but I think we should do it. just experimenting i found other leaks, e.g. in LineFileDocs.
```
[junit4] ERROR 0.00s J0 | TestForceMergeForever (suite) <<<
[junit4] > Throwable #1: java.lang.IllegalStateException: ThreadLocal leaks were found:
[junit4] > 1. thread=SUITE-TestForceMergeForever-seed#[AF7141C55A57350E]-worker value=WeakReference>
[junit4] > 2. thread=SUITE-TestForceMergeForever-seed#[AF7141C55A57350E]-worker value=LineFileDocs$DocState
```
---
Migrated from [LUCENE-6335](https://issues.apache.org/jira/browse/LUCENE-6335) by Robert Muir (@rmuir), updated Mar 05 2015
Attachments: [LUCENE-6335.patch](https://apache.github.io/lucene-jira-archive/attachments/LUCENE-6335/LUCENE-6335.patch) (versions: 3)
Contributor guide
Research direction
Start by reviewing the attached LUCENE-6335.patch and reproducing the thread-local leak reported by TestForceMergeForever. Inspect the Analyzer$TokenStreamComponents and LineFileDocs$DocState values named in the failure; done means the relevant tests no longer report thread-local leaks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100