apache / apache/lucene

clean up MockDirectoryWrapper.close() [LUCENE-4058]

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

Description

background on #5119.

MockDirectoryWrapper.close() should always try to close its wrapped resources in a finally block, even if its going to throw exceptions.

Otherwise if lots of tests fail, resources could pile up (e.g. RAMDirs).

---
Migrated from [LUCENE-4058](https://issues.apache.org/jira/browse/LUCENE-4058) by Robert Muir (@rmuir), updated Jul 06 2012

Contributor guide

Open the contributing guide

Research direction

Locate MockDirectoryWrapper.close() and read the background in #5119 to understand the wrapped resources involved. Done means close() still attempts to close those resources in a finally block when an exception is thrown; run the existing tests covering MockDirectoryWrapper and resource cleanup.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
testing
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.