apache / apache/arrow-rs-object-store
Add error coverage for `LocalFileSystem`
- Dominant language
- Rust
- Stars
- 322
- Forks
- 212
- Avg merge
- 5d 2h
- Merged PRs (30d)
- 10
Description
**Is your feature request related to a problem or challenge? Please describe what you are trying to do.**
One thing I noticed while reviewing https://github.com/apache/arrow-rs-object-store/pull/643 is that basically all error paths are untested in `LocalFileSystem` as they require IO errors to trigger.
For example, using `llvm-cov` you can do
```shell
cargo llvm-cov --html test -p object_store
```
And then look at local.html: [local.rs.html](https://github.com/user-attachments/files/28969041/local.rs.html)
And you'll see the errors are totally uncoveed
**Describe the solution you'd like**
I would like to also test the error paths.
**Describe alternatives you've considered**
for many of them, this will likely require mocking the various `std::fs::File` apis somehow to inject determinisitic errors.
If anyone wants to work on this issue, I suggest creating a PR with the scaffolding and one or two new tests so we can agree on the pattern. Then we can make follow on PRs to fill out the rest.
**Additional context**
Contributor guide
Research direction
Run `cargo llvm-cov --html test -p object_store` and inspect `local.rs.html` to identify the uncovered LocalFileSystem error paths. Start by locating the LocalFileSystem tests and determine how filesystem errors can be injected deterministically. Add the proposed scaffolding and one or two tests, with the pattern established for follow-on coverage work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- testing-qa
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100