amogh-jahagirdar commented on code in PR #14709:
URL: https://github.com/apache/iceberg/pull/14709#discussion_r2708816617


##########
core/src/test/java/org/apache/iceberg/rest/TestRESTCatalog.java:
##########
@@ -4326,6 +4326,23 @@ public void 
testTableCacheAgeDoesNotRefreshesAfterAccess() {
         .isEqualTo(HALF_OF_TABLE_EXPIRATION);
   }
 
+  @Test
+  public void testNumLoadTableCallsForMergeAppend() {
+    RESTCatalogAdapter adapter = Mockito.spy(new 
RESTCatalogAdapter(backendCatalog));
+
+    RESTCatalog catalog = catalog(adapter);
+
+    catalog.createNamespace(TABLE.namespace());
+
+    BaseTable table = (BaseTable) catalog.createTable(TABLE, SCHEMA);
+
+    table.newAppend().appendFile(FILE_A).commit();

Review Comment:
   Before the commit, we may want to extract out the CreateSnapshotEvent and 
assert it's what we expect, since that's the part we're changing?



##########
core/src/test/java/org/apache/iceberg/catalog/CatalogTests.java:
##########
@@ -3271,6 +3271,11 @@ public void testCatalogWithCustomMetricsReporter() 
throws IOException {
     assertThat(CustomMetricsReporter.SCAN_COUNTER.get()).isEqualTo(1);
     // reset counter in case subclasses run this test multiple times
     CustomMetricsReporter.SCAN_COUNTER.set(0);
+
+    // append file through MergeAppend and check and reset counter
+    table.newAppend().appendFile(FILE_A).commit();
+    assertThat(CustomMetricsReporter.COMMIT_COUNTER.get()).isEqualTo(1);
+    CustomMetricsReporter.COMMIT_COUNTER.set(0);

Review Comment:
   Sorry not entirely following, what additional behavior related to this 
change are we trying test here? This just looks like it verifies the commit is 
performed and the metrics after that.



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