mehakmeet commented on code in PR #4331:
URL: https://github.com/apache/hadoop/pull/4331#discussion_r899874607


##########
hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestAzureBlobFileSystemRename.java:
##########
@@ -181,17 +181,18 @@ public void testRenameWithNoDestinationParentDir() throws 
Exception {
     byte[] data = dataset(1024, 'a', 'z');
     writeDataset(fs, sourcePath, data, data.length, 1024, true);
 
-    // Check if we have retried the rename operation.
-    boolean hasRenameRetriedOnce = fs.getAbfsClient().isHasRetriedRenameOnce();
-    assertFalse("Rename shouldn't be retried before attempting to rename",
+    // Check if we have seen an incomplete state.
+    boolean hasRenameRetriedOnce = 
fs.getAbfsClient().isMetadataIncompleteState();
+    assertFalse("No incomplete state should be seen before attempting to "
+            + "rename",
         hasRenameRetriedOnce);
 
     // Verify that Renaming on a destination with no parent dir wasn't
     // successful.
     assertFalse(fs.rename(sourcePath, destPath));
 
-    // Verify that Rename operation was retried once after not succeeding.
-    hasRenameRetriedOnce = fs.getAbfsClient().isHasRetriedRenameOnce();
+    // Verify that metadata was in an incomplete state after the rename 
failure.
+    hasRenameRetriedOnce = fs.getAbfsClient().isMetadataIncompleteState();

Review Comment:
   What I could do is, have a new counter in Abfsclient itself, which would 
count the attempts to rename path, and could verify that if we do a single 
rename and the incomplete metadata state condition is met, we attempt to rename 
twice?



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