anmolanmol1234 commented on code in PR #7353:
URL: https://github.com/apache/hadoop/pull/7353#discussion_r1944495900


##########
hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestAzureBlobFileSystemCreate.java:
##########
@@ -666,6 +734,127 @@ public void 
testNegativeScenariosForCreateOverwriteDisabled()
     validateCreateFileException(AbfsRestOperationException.class, abfsStore);
   }
 
+  /**
+   * Tests that the exception thrown during the creation of a marker is 
swallowed.
+   * This test verifies that when an exception occurs during the creation of a 
marker,
+   * it does not propagate and is handled internally and file creation still 
succeeds.
+   *
+   * @throws Throwable if an error occurs during the test execution
+   */
+  @Test
+  public void testCreateMarkerFailExceptionIsSwallowed()
+      throws Throwable {
+
+    final AzureBlobFileSystem currentFs = getFileSystem();
+    Configuration config = new Configuration(this.getRawConfiguration());
+    config.set("fs.azure.enable.conditional.create.overwrite",
+        Boolean.toString(true));
+
+    final AzureBlobFileSystem fs =
+        (AzureBlobFileSystem) FileSystem.newInstance(currentFs.getUri(),
+            config);
+
+    // Get mock AbfsClient with current config
+    AbfsClient mockClient = Mockito.spy(fs.getAbfsClient());
+    AzureBlobFileSystemStore spiedStore = Mockito.spy(fs.getAbfsStore());
+    spiedStore.setClient(mockClient);
+
+    Assume.assumeTrue(mockClient instanceof AbfsBlobClient);

Review Comment:
   taken



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