ajantha-bhat commented on code in PR #7641:
URL: https://github.com/apache/iceberg/pull/7641#discussion_r1198071972


##########
nessie/src/test/java/org/apache/iceberg/nessie/TestNessieTable.java:
##########
@@ -579,6 +584,44 @@ public void testGCEnabled() {
             "Cannot expire snapshots: GC is disabled (deleting files may 
corrupt other tables)");
   }
 
+  @Test
+  public void testTableMetadataFilesCleanupDisable() {
+    Table icebergTable = catalog.loadTable(TABLE_IDENTIFIER);
+
+    Assertions.assertThat(
+            
icebergTable.properties().get(TableProperties.METADATA_DELETE_AFTER_COMMIT_ENABLED))
+        .isNotNull()
+        .isEqualTo("false");
+
+    icebergTable
+        .updateProperties()
+        .set(TableProperties.METADATA_DELETE_AFTER_COMMIT_ENABLED, "true")
+        .commit();
+    icebergTable
+        .updateProperties()
+        .set(TableProperties.METADATA_PREVIOUS_VERSIONS_MAX, "1")
+        .commit();
+
+    String metadataFileLocation =
+        ((BaseTable) 
icebergTable).operations().current().metadataFileLocation();
+    Path metadataFileLocationPath = 
Paths.get(metadataFileLocation.replaceFirst("file:", ""));

Review Comment:
   Can you paste the expected Assertions here? I think I didn't fully get it. 
   
   Also, other places uses this metadata location string directly 
   
https://github.com/apache/iceberg/blob/39a5f503c1d19d41a15b74ea53e3d5e51d495874/hive-metastore/src/test/java/org/apache/iceberg/hive/HiveTableTest.java#L238



-- 
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]

Reply via email to