arunsarin85 commented on code in PR #11324:
URL: https://github.com/apache/ozone/pull/11324#discussion_r4122309546


##########
hadoop-hdds/rocksdb-checkpoint-differ/src/test/java/org/apache/ozone/rocksdiff/TestRocksDBCheckpointDiffer.java:
##########
@@ -1065,12 +1046,72 @@ void diffAllSnapshots(RocksDBCheckpointDiffer differ)
         
assertThat(actualFiles).containsExactlyInAnyOrderElementsOf(expectedFiles);
       }
     }
-    // Guard against getSSTDiffList silently returning nothing for every input.
     assertThat(sawNonEmptyDiff)
         .as("expected at least one non-empty SST diff across snapshots")
         .isTrue();
   }
 
+  private Set<String> allTablesForDiff() {
+    Set<String> tables = new HashSet<>(COLUMN_FAMILIES_TO_TRACK_IN_DAG);
+    tables.add("compactionLogTable");
+    return tables;
+  }
+
+  private List<SstFileInfo> getTrackedSstFilesFromSnapshot(DifferSnapshotInfo 
snap) {
+    return snap.getSstFiles(0, allTablesForDiff());
+  }
+
+  private static List<SstFileInfo> requireSstDiffList(
+      Optional<List<SstFileInfo>> diffList,
+      DifferSnapshotInfo src,
+      DifferSnapshotInfo dest) {
+    if (diffList.isPresent()) {
+      return diffList.get();
+    }
+    throw new AssertionError(String.format(
+        "getSSTDiffList returned empty Optional (DAG could not reach all 
destination SSTs) "
+            + "from '%s' to '%s'", src.getDbPath(0), dest.getDbPath(0)));
+  }

Review Comment:
   removed requireSstDiffList and use .orElseThrow() directly on each 
getSSTDiffList result.



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