dimas-b commented on code in PR #7641:
URL: https://github.com/apache/iceberg/pull/7641#discussion_r1198075839


##########
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:
   If it's a common pattern in test code, I'm fine with following it in Nessie 
tests.



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