-
Notifications
You must be signed in to change notification settings - Fork 3k
Spark 3.5: Fix flaky test due to deleting temp directory failure #10811
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
Conversation
spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/source/TestDataFrameWrites.java
Outdated
Show resolved
Hide resolved
|
This PR didn't fix but exposed more underlying errors from https://github.com/apache/iceberg/actions/runs/10156307633/job/28084490263?pr=10811 |
|
@Fokko @dramaticlly PTAL. This PR now proactively deletes temporary directory catching exceptions until it's cleaned up. |
|
cc @nastra please help review |
| assertThat(snapshotBeforeFailingWrite).isEqualTo(snapshotAfterFailingWrite); | ||
| assertThat(resultBeforeFailingWrite).isEqualTo(resultAfterFailingWrite); | ||
|
|
||
| while (location.exists()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems like a workaround. https://stackoverflow.com/questions/56290320/junit-cannot-delete-tempdir-with-file-created-by-spark-structured-streaming indicates that the issue might be due to a resource not being closed, so maybe we should investigate what the actual root cause of this issue is
Fokko
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm seeing this one quite often. I would suggest merging this and creating an issue to track the underlying issue
fixes #10480
fixes #10569