anujmodi2021 commented on code in PR #6879:
URL: https://github.com/apache/hadoop/pull/6879#discussion_r1705904170
##########
hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestAzureBlobFileSystemInitAndCreate.java:
##########
@@ -96,6 +110,33 @@ public void testNoGetAclCallOnHnsConfigPresence() throws
Exception {
store.getIsNamespaceEnabled(tracingContext);
Mockito.verify(client, Mockito.times(0))
- .getAclStatus(Mockito.anyString(), Mockito.any(TracingContext.class));
+ .getAclStatus(Mockito.anyString(), any(TracingContext.class));
+ }
+
+ // Todo: [FnsOverBlob] Remove this test case once Blob Endpoint Support is
ready and enabled.
+ @Test
+ public void testFileSystemInitFailsWithBlobEndpoitUrl() throws Exception {
+ Configuration configuration = getRawConfiguration();
+ String defaultUri = configuration.get(FS_DEFAULT_NAME_KEY);
+ String blobUri = defaultUri.replace(ABFS_DFS_DOMAIN_NAME,
ABFS_BLOB_DOMAIN_NAME);
+ AzureBlobFileSystemException ex =
+ intercept(AzureBlobFileSystemException.class, () ->
+ FileSystem.newInstance(new Path(blobUri).toUri(), configuration));
+
Assertions.assertThat(ex).isInstanceOf(InvalidConfigurationValueException.class);
+ Assertions.assertThat(ex.getMessage()).contains("Blob Endpoint Support not
yet available");
+ }
+
+ @Test
+ public void testFileSystemInitFailsIfNotAbleToDetermineAccountType() throws
Exception {
+ AzureBlobFileSystem fs = ((AzureBlobFileSystem) FileSystem.newInstance(
+ getRawConfiguration()));
+ AzureBlobFileSystem mockedFs = Mockito.spy(fs);
+ Mockito.doThrow(new AbfsRestOperationException(HTTP_UNAVAILABLE,
"Throttled",
+ "Throttled", null)).when(mockedFs).getIsNamespaceEnabled(any());
+ AzureBlobFileSystemException ex =
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]