duongkame commented on code in PR #5694:
URL: https://github.com/apache/ozone/pull/5694#discussion_r1440757125


##########
hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/request/key/TestOMKeyRenameRequestWithFSO.java:
##########
@@ -119,14 +119,13 @@ public void 
testValidateAndUpdateCacheWithFromKeyInvalid() throws Exception {
 
   @Test
   public void testPreExecuteWithUnNormalizedPath() throws Exception {
+    addKeyToTable(fromKeyInfo);
     String toKeyName =
         "///root" + OzoneConsts.OZONE_URI_DELIMITER +
             OzoneConsts.OZONE_URI_DELIMITER +
             UUID.randomUUID();
     String fromKeyName =
-        "///root/sub-dir" + OzoneConsts.OZONE_URI_DELIMITER +
-            OzoneConsts.OZONE_URI_DELIMITER +
-            UUID.randomUUID();
+        "///" + fromKeyInfo.getKeyName();

Review Comment:
   This test runs `OMKeyRenameRequestWithFSO.preExecute` with unnormalize paths.
   With ACL checks moved to `preExecute`, the fromKeyName is now expected to be 
an existing one. Previously it was not a requirement and that's why fromKeyName 
could be generated from a `UUID.randomUUID()`.



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