apache / apache/polaris

Tests should not "spam" system directories

Open
#758 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
2.1k
Forks
522
Avg merge
1d 17h
Merged PRs (30d)
137

Description

### Describe the bug

Some tests write test data to the system global `/tmp`:
```
/tmp/buckets
/tmp/ns
/tmp/ns1
/tmp/PolarisOverlappingTableTest
/tmp/test-private*.pem
/tmp/test-public*.pem
```

This is bad practice and should be replaced with JUnit's `@TempDir`. It can also easily cause issues when tests are run repeatedly.

Contributor guide

Open the contributing guide

Research direction

Search the test sources for the listed global paths, including /tmp/buckets, /tmp/ns, /tmp/PolarisOverlappingTableTest, and the test PEM files, and inspect existing JUnit @TempDir usage. Replace those system-directory writes with temporary test directories, then run the affected tests repeatedly to confirm they pass without leaving global files.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.