bhattmanish98 commented on code in PR #7364:
URL: https://github.com/apache/hadoop/pull/7364#discussion_r1967081561


##########
hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestAzureBlobFileSystemMkDir.java:
##########
@@ -167,4 +187,163 @@ public void testMkdirWithExistingFilename() throws 
Exception {
     intercept(FileAlreadyExistsException.class, () -> fs.mkdirs(new 
Path("/testFilePath")));
     intercept(FileAlreadyExistsException.class, () -> fs.mkdirs(new 
Path("/testFilePath/newDir")));
   }
+
+  /**
+   * Tests the idempotency of creating a path with retries by simulating
+   * a conflict response (HTTP 409) from the Azure Blob File System client.
+   * The method ensures that the path creation operation retries correctly
+   * with the proper transaction ID headers, verifying idempotency during
+   * failure recovery.
+   *
+   * @throws Exception if any error occurs during the operation.
+   */
+  @Test
+  public void createPathRetryIdempotency() throws Exception {
+    Configuration configuration = new Configuration(getRawConfiguration());
+    configuration.set(FS_AZURE_ENABLE_CLIENT_TRANSACTION_ID, "true");

Review Comment:
   For this test case, we are not relying on server's client transaction id. 
Therefore, we are manually hardcoding here this to true. But for all other test 
cases, we are checking the actual response we are getting from server. So, if 
server changes are not deployed in the tenant where we are testing this change, 
the test would fail.



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