Fix tests to respect java.io.tmpdir by default [LUCENE-9158]
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 1.4k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 88
Description
Currently the tests destroy your SSDs by writing temp test data to `build/test/` in your checkout.
It would be better to respect `java.io.tmpdir` for where all the temporary files get written. This way, if someone has configured their system/environment variables appropriately, it won't destroy SSD.
On linux it may work by default in many cases, as a lot of linux systems mount `/tmp` on tmpfs by default.
On windows users could have created a [RAM drive](https://en.wikipedia.org/wiki/List_of_RAM_drive_software) such as `R:` and have `TMP` environment variable pointed at it, we should respect that.
---
Migrated from [LUCENE-9158](https://issues.apache.org/jira/browse/LUCENE-9158) by Robert Muir (@rmuir), updated Jan 22 2020
Attachments: [LUCENE-9158.patch](https://apache.github.io/lucene-jira-archive/attachments/LUCENE-9158/LUCENE-9158.patch)
Contributor guide
Research direction
No source file or test path is named. Start by reviewing the attached LUCENE-9158.patch and locating the test temporary-file setup; done means temporary test data respects java.io.tmpdir instead of defaulting to build/test/.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100