xichen01 commented on code in PR #9593:
URL: https://github.com/apache/ozone/pull/9593#discussion_r2682891871


##########
hadoop-ozone/common/src/test/java/org/apache/hadoop/ozone/om/helpers/TestOmLCFilter.java:
##########
@@ -90,6 +92,32 @@ public void testInValidFilter() {
 
   }
 
+  @Test
+  public void testFilterValidation() {
+    // 1. Prefix is Trash path
+    OmLCFilter.Builder trashPrefixFilter = 
getOmLCFilterBuilder(FileSystem.TRASH_PREFIX, null, null);
+    assertOMException(() -> 
trashPrefixFilter.build().valid(BucketLayout.DEFAULT), INVALID_REQUEST,
+        "Lifecycle rule prefix cannot be trash root");
+
+    // 2. Prefix too long
+    String longPrefix = RandomStringUtils.randomAlphanumeric(1025);

Review Comment:
   Yes, more readable, updated



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