nsivabalan commented on code in PR #13008:
URL: https://github.com/apache/hudi/pull/13008#discussion_r2010860861


##########
hudi-common/src/test/java/org/apache/hudi/common/table/read/TestHoodieFileGroupReaderBase.java:
##########
@@ -250,6 +287,38 @@ private Map<String, String> 
getCommonConfigs(RecordMergeMode recordMergeMode) {
     return configMapping;
   }
 
+  private void validateCompactionStats(StorageConfiguration<?> storageConf,
+                                       String tablePath) {
+    HoodieTableMetaClient metaClient = 
HoodieTestUtils.createMetaClient(storageConf, tablePath);
+    HoodieTimeline activeTimeline = metaClient.getActiveTimeline();
+    List<HoodieInstant> compactionInstants = activeTimeline
+        .getCommitsAndCompactionTimeline()
+        .getInstants()
+        .stream().filter(i -> i.getAction().equals(COMMIT_ACTION))
+        .collect(Collectors.toList());
+    assertFalse(compactionInstants.isEmpty());
+
+    try {
+      // Validate if total log records is updated.
+      // More validation can be added here if needed.
+      HoodieCommitMetadata metadata = activeTimeline
+          .readCommitMetadata(compactionInstants.get(0));
+      assertTrue(metadata.getTotalLogRecordsCompacted() > 0);

Review Comment:
   atleast for total log records, we should be able to assert exact value right?
   for scan time, and other latencies, I understand, we cannot do exact match 
w/ our expected value. 
   but for total log records compacted, numInserts, numUpdates etc, we should 
assert for exact value. 
   



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

Reply via email to