Ankitkj1999 opened a new issue, #18938:
URL: https://github.com/apache/iceberg/issues/18938
### Apache Iceberg version
main (development)
### Query engine
None
### Please describe the bug 🐞
PartitionStatsHandlerTestBase.testCopyOnWriteDelete() performs two calls to
testTable.newPartitionStatisticsScan().scan() without closing the resulting
CloseableIterable<PartitionStatistics>.
Because the underlying Avro reader file descriptor remains open, on Windows
the operating system locks the temporary metadata statistics files
(partition-stats-1-....avro and partition-stats-3-....avro). When JUnit 5's
@TempDir extension attempts to clean up the temporary directory during test
teardown, it fails with:
\\\
TestAvroPartitionStatsHandler > testCopyOnWriteDelete() FAILED
java.io.IOException: Failed to delete temp directory
C:\Users\...\AppData\Local\Temp\junit-...\metadata\partition-stats-1-...avro
\\\
Closing both scans in try-with-resources (consistent with other test methods
in PartitionStatsHandlerTestBase such as lines 209, 287, and 444) releases the
open file handles and resolves the failure.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]