You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "hemantk-12 (via GitHub)" <gi...@apache.org> on 2023/07/28 20:48:59 UTC
[GitHub] [ozone] hemantk-12 commented on a diff in pull request #5127: HDDS-9093. Appended tailing slash while constructing the bucket key for SSTFilteringService
hemantk-12 commented on code in PR #5127:
URL: https://github.com/apache/ozone/pull/5127#discussion_r1278072123
##########
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:
Added tests as suggested. Thanks @sadanand48.
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org