sadanand48 commented on code in PR #5127:
URL: https://github.com/apache/ozone/pull/5127#discussion_r1278065078


##########
hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/TestSstFilteringService.java:
##########
@@ -309,4 +311,21 @@ private static OmKeyArgs 
createAndCommitKey(OzoneManagerProtocol writeClient,
     return keyArg;
   }
 
+  @Test
+  public void testFilterFunction() {
+    Assert.assertTrue(SstFilteringService.FILTER_FUNCTION.apply(
+        "/vol1/bucket1/key1",
+        "/vol1/bucket1/key1",
+        "/vol1/bucket1/"));
+
+    Assert.assertFalse(SstFilteringService.FILTER_FUNCTION.apply(
+        "/vol1/bucket1/key1",
+        "/vol1/bucket1/key1",
+        "/vol1/bucket2/"));
+
+    Assert.assertFalse(SstFilteringService.FILTER_FUNCTION.apply(
+        "/vol1/bucket1/key1",
+        "/vol1/bucket1/key1",
+        "/vol1/bucket/"));
+  }

Review Comment:
   ```suggestion
         Assert.assertTrue(SstFilteringService.FILTER_FUNCTION.apply(
           "/vol1/bucket1/key1",
           "/vol1/bucket1/key80",
           "/vol1/bucket1/"));
   
       Assert.assertTrue(SstFilteringService.FILTER_FUNCTION.apply(
           "/vol1/bucket1/key1",
           "/vol1/bucket5/key1",
           "/vol1/bucket3/"));
   
       Assert.assertFalse(SstFilteringService.FILTER_FUNCTION.apply(
           "/vol1/bucket1/key1",
           "/vol1/bucket4/key9",
           "/vol1/bucket5/"));
     }
   ```
   Maybe add  cases where first & last keys are different



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