nastra commented on code in PR #9184:
URL: https://github.com/apache/iceberg/pull/9184#discussion_r1869624012
##########
core/src/test/java/org/apache/iceberg/hadoop/TestCatalogUtilDropTable.java:
##########
@@ -56,6 +57,23 @@
public class TestCatalogUtilDropTable extends HadoopTableTestBase {
+ @Test
+ public void dropTableDataDoNotThrowWhenReadOrDeletesFail() {
+ table.newFastAppend().appendFile(FILE_A).commit();
+ table.newAppend().appendFile(FILE_B).commit();
+
+ TableMetadata tableMetadata = readMetadataVersion(3);
+
+ FileIO fileIO = Mockito.mock(FileIO.class);
+ Mockito.doThrow(new
RuntimeException()).when(fileIO).deleteFile(ArgumentMatchers.anyString());
+ Mockito.doThrow(new
RuntimeException()).when(fileIO).newInputFile(ArgumentMatchers.anyString());
Review Comment:
this is really the only mocking that this test requires, so I'd remove the
other ones
--
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]