Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests should not "spam" system directories #758

Open
snazy opened this issue Jan 15, 2025 · 1 comment
Open

Tests should not "spam" system directories #758

snazy opened this issue Jan 15, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@snazy
Copy link
Member

snazy commented Jan 15, 2025

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.

@snazy snazy added the bug Something isn't working label Jan 15, 2025
@snazy
Copy link
Member Author

snazy commented Jan 16, 2025

This is a real issue causing false-positive test failures:

Caused by: org.apache.hadoop.fs.FileAlreadyExistsException: File already exists: file:/tmp/ns1/my_table/metadata/v1.metadata.json
	at org.apache.hadoop.fs.RawLocalFileSystem.create(RawLocalFileSystem.java:559)
	at org.apache.hadoop.fs.RawLocalFileSystem.create(RawLocalFileSystem.java:597)
	at org.apache.hadoop.fs.ChecksumFileSystem$ChecksumFSOutputSummer.<init>(ChecksumFileSystem.java:633)
	at org.apache.hadoop.fs.ChecksumFileSystem.create(ChecksumFileSystem.java:721)
	at org.apache.hadoop.fs.ChecksumFileSystem.create(ChecksumFileSystem.java:700)
	at org.apache.hadoop.fs.FileSystem.create(FileSystem.java:1233)
	at org.apache.hadoop.fs.FileSystem.create(FileSystem.java:1210)
	at org.apache.hadoop.fs.FileSystem.create(FileSystem.java:1091)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant