Skip to content

Commit 58e91f7

Browse files
author
Anuj Modi
committed
Test Fixes
1 parent 25d6434 commit 58e91f7

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AzureBlobFileSystemStore.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ public void validateConfiguredServiceType(TracingContext tracingContext)
301301
}
302302
if (getIsNamespaceEnabled(tracingContext) && getConfiguredServiceType() == AbfsServiceType.BLOB) {
303303
// This could be because of either wrongly configured url or wrongly configured fns service type.
304-
if(identifyAbfsServiceTypeFromUrl() == AbfsServiceType.BLOB) {
304+
if (identifyAbfsServiceTypeFromUrl() == AbfsServiceType.BLOB) {
305305
throw new InvalidConfigurationValueException(FS_DEFAULT_NAME_KEY);
306306
}
307307
throw new InvalidConfigurationValueException(FS_AZURE_FNS_ACCOUNT_SERVICE_TYPE);

hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestAbfsBlobClient.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
import org.apache.hadoop.conf.Configuration;
2626
import org.apache.hadoop.fs.FileSystem;
2727
import org.apache.hadoop.fs.azurebfs.constants.FSOperationType;
28+
import org.apache.hadoop.fs.azurebfs.contracts.exceptions.AzureBlobFileSystemException;
29+
import org.apache.hadoop.fs.azurebfs.contracts.exceptions.InvalidConfigurationValueException;
2830
import org.apache.hadoop.fs.azurebfs.services.AbfsBlobClient;
2931
import org.apache.hadoop.fs.azurebfs.services.AbfsClient;
3032
import org.apache.hadoop.fs.azurebfs.utils.Base64;
@@ -51,9 +53,9 @@ public void testAbfsBlobClient() throws Exception {
5153
Assertions.assertThat(client).isInstanceOf(AbfsBlobClient.class);
5254
// Make sure all client.REST_API_CALLS succeed with right parameters
5355
testClientAPIs(client, getTestTracingContext(fs));
54-
} catch (UnsupportedOperationException ex) {
55-
// Todo: [FnsOverBlob] - Remove this block once all Blob Endpoint Support is ready.
56-
Assertions.assertThat(ex.getMessage()).contains("Blob Endpoint Support is not yet implemented");
56+
} catch (AzureBlobFileSystemException ex) {
57+
// Todo: [FnsOverBlob] - Remove this block once complete Blob Endpoint Support is ready.
58+
Assertions.assertThat(ex).isInstanceOf(InvalidConfigurationValueException.class);
5759
}
5860
}
5961

0 commit comments

Comments
 (0)