rdblue commented on a change in pull request #3097:
URL: https://github.com/apache/iceberg/pull/3097#discussion_r706859589
##########
File path: core/src/test/java/org/apache/iceberg/hadoop/TestHadoopCatalog.java
##########
@@ -237,6 +239,24 @@ public void testDropTable() throws Exception {
Assert.assertFalse(fs.isDirectory(new Path(metaLocation)));
}
+ @Test
+ public void testDropNonIcebergTable() throws Exception {
+ Configuration conf = new Configuration();
+ String warehousePath = temp.newFolder().getAbsolutePath();
+ HadoopCatalog catalog = new HadoopCatalog(conf, warehousePath);
+ TableIdentifier testTable = TableIdentifier.of("db", "ns1", "ns2", "tbl");
+ String metaLocation = catalog.defaultWarehouseLocation(testTable);
+
+ FileSystem fs = Util.getFs(new Path(metaLocation), conf);
+ File tablePath = new File(warehousePath + "/db/ns1/ns2/tbl");
+ tablePath.mkdirs();
+ Assert.assertTrue(fs.isDirectory(new Path(metaLocation)));
+
+ Assert.assertFalse(catalog.dropTable(testTable));
+ Assert.assertTrue(fs.isDirectory(new Path(metaLocation)));
+ FileUtils.deleteDirectory(new File(warehousePath + "/db"));
Review comment:
No need to delete this. The temp folder will handle it.
--
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]