RussellSpitzer commented on code in PR #8525:
URL: https://github.com/apache/iceberg/pull/8525#discussion_r1333428954
##########
core/src/test/java/org/apache/iceberg/TestDeleteFiles.java:
##########
@@ -412,6 +412,24 @@ public void testDeleteWithCollision() {
afterDeletePartitions);
}
+ @Test
+ public void testDeleteValidateFileExistence() {
+ commit(table, table.newFastAppend().appendFile(FILE_B), branch);
+ commit(table, table.newDelete().deleteFile(FILE_B).validateFilesExist(),
branch);
+ Assertions.assertThatThrownBy(
+ () -> commit(table,
table.newDelete().deleteFile(FILE_B).validateFilesExist(), branch))
+ .isInstanceOf(ValidationException.class);
+
Assertions.assertThat(table.io().newInputFile(FILE_B.path().toString()).exists()).isFalse();
Review Comment:
We discussed on slack, this should be replaced with a metadata check since
these files are not physically on the disk because this base test class doesn't
ever actually make them.
--
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]