chihsuan commented on code in PR #11183:
URL: https://github.com/apache/ozone/pull/11183#discussion_r3914922570


##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/ozone/TestHSync.java:
##########
@@ -634,6 +633,23 @@ private List<OmKeyInfo> getKeyInfo(BucketLayout 
bucketLayout) {
     return omKeyInfo;
   }
 
+  /**
+   * Tests in this class share one bucket, so other tests' keys can still be 
in the tables.
+   * Narrow a table listing down to the keys the calling test created.
+   */
+  private List<OmKeyInfo> filterByKeyName(List<OmKeyInfo> omKeyInfos, 
String... keyNames) {
+    List<OmKeyInfo> filtered = new ArrayList<>();
+    for (OmKeyInfo omKeyInfo : omKeyInfos) {
+      for (String keyName : keyNames) {
+        if (keyName.equals(omKeyInfo.getKeyName())) {

Review Comment:
   Just a thought, would `getFileName()` work better here than `getKeyName()`? 



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