ashishkumar50 commented on code in PR #4607:
URL: https://github.com/apache/ozone/pull/4607#discussion_r1180342504


##########
hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/request/snapshot/TestOMSnapshotCreateRequest.java:
##########
@@ -326,11 +334,42 @@ private void renameKey(String fromKey, String toKey) 
throws IOException {
         new OMKeyRenameResponse(omResponse, fromKeyInfo.getKeyName(),
             toKeyInfo.getKeyName(), toKeyInfo);
 
-    
Assert.assertTrue(omMetadataManager.getSnapshotRenamedKeyTable().isEmpty());
     omKeyRenameResponse.addToDBBatch(omMetadataManager, batchOperation);
     omMetadataManager.getStore().commitBatchOperation(batchOperation);
   }
 
+  private void renameDir(String fromKey, String toKey, long offset)
+      throws Exception {
+    String fromKeyParentName = UUID.randomUUID().toString();
+    OmKeyInfo fromKeyParent = OMRequestTestUtils.createOmKeyInfo(volumeName,
+        bucketName, fromKeyParentName, HddsProtos.ReplicationType.RATIS,
+        HddsProtos.ReplicationFactor.THREE, 100L);
+
+    OmKeyInfo toKeyInfo = addKey(fromKey, offset + 4L);

Review Comment:
   This need to be 
   OmKeyInfo toKeyInfo = addKey(**toKey**, offset + 4L); 
   OmKeyInfo fromKeyInfo = addKey(**fromKey**, offset + 5L); ?



##########
hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/request/snapshot/TestOMSnapshotCreateRequest.java:
##########
@@ -311,9 +318,10 @@ public void testEntryExists() throws Exception {
         omResponse.getStatus());
   }
 
-  private void renameKey(String fromKey, String toKey) throws IOException {
-    OmKeyInfo toKeyInfo = addKey(fromKey);
-    OmKeyInfo fromKeyInfo = addKey(toKey);
+  private void renameKey(String fromKey, String toKey, long offset)
+      throws IOException {
+    OmKeyInfo toKeyInfo = addKey(fromKey, offset + 1L);

Review Comment:
   This need to be 
   OmKeyInfo toKeyInfo = addKey(toKey, offset + 1L);
   OmKeyInfo fromKeyInfo = addKey(fromKey, offset + 2L); ?



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