BaseDirectoryTestCase should use try-with-resources for its Directories [LUCENE-6916]
Open
legacy-jira-priority:Minor
type:enhancement
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 1.4k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 88
Description
I'm playing around with writing a nio2 FileSystem implementation for HDFS that will work with Directory, and it currently leaks threads everywhere because if a BaseDirectoryTestCase test fails it doesn't close its Directory. This obviously won't be a problem if everything passes, but it will probably be a while before that's true and it makes iterative development a bit of a pain.
---
Migrated from [LUCENE-6916](https://issues.apache.org/jira/browse/LUCENE-6916) by Alan Woodward (@romseygeek)
Attachments: [LUCENE-6916.patch](https://apache.github.io/lucene-jira-archive/attachments/LUCENE-6916/LUCENE-6916.patch)
Contributor guide
Assessment
This issue has not been assessed yet.