Skip to content

Commit acca3fb

Browse files
author
Anuj Modi
committed
Missed Chages
1 parent 19e9aa2 commit acca3fb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
import org.apache.hadoop.fs.permission.FsAction;
3737
import org.apache.hadoop.fs.permission.FsPermission;
3838

39+
import static org.apache.hadoop.fs.azurebfs.constants.ConfigurationKeys.FS_AZURE_ACCOUNT_AUTH_TYPE_PROPERTY_NAME;
3940
import static org.apache.hadoop.fs.azurebfs.constants.ConfigurationKeys.FS_AZURE_ACCOUNT_IS_HNS_ENABLED;
4041
import static org.apache.hadoop.fs.azurebfs.constants.ConfigurationKeys.FS_AZURE_SAS_TOKEN_PROVIDER_TYPE;
4142
import static org.apache.hadoop.fs.azurebfs.constants.TestConfigurationKeys.MOCK_SASTOKENPROVIDER_FAIL_INIT;
@@ -68,7 +69,7 @@ public void setup() throws Exception {
6869
Assume.assumeTrue(isHNSEnabled);
6970
loadConfiguredFileSystem();
7071
this.getConfiguration().set(FS_AZURE_SAS_TOKEN_PROVIDER_TYPE, TEST_AUTHZ_CLASS);
71-
this.getConfiguration().set(ConfigurationKeys.FS_AZURE_ACCOUNT_AUTH_TYPE_PROPERTY_NAME, "SAS");
72+
this.getConfiguration().set(FS_AZURE_ACCOUNT_AUTH_TYPE_PROPERTY_NAME, "SAS");
7273
super.setup();
7374
}
7475

@@ -80,6 +81,7 @@ public void testSASTokenProviderInitializeException() throws Exception {
8081
Configuration testConfig = new Configuration(this.getConfiguration().getRawConfiguration());
8182
testConfig.set(FS_AZURE_SAS_TOKEN_PROVIDER_TYPE, TEST_ERR_AUTHZ_CLASS);
8283
testConfig.set(MOCK_SASTOKENPROVIDER_RETURN_EMPTY_SAS_TOKEN, "true");
84+
// Setting IS_HNS_ENABLED to avoid the exception thrown by the HNS check.
8385
testConfig.set(FS_AZURE_ACCOUNT_IS_HNS_ENABLED, this.getIsNamespaceEnabled(fs) + "");
8486

8587
intercept(SASTokenProviderException.class,
@@ -96,6 +98,7 @@ public void testSASTokenProviderEmptySASToken() throws Exception {
9698
Configuration testConfig = new Configuration(this.getConfiguration().getRawConfiguration());
9799
testConfig.set(FS_AZURE_SAS_TOKEN_PROVIDER_TYPE, TEST_ERR_AUTHZ_CLASS);
98100
testConfig.set(MOCK_SASTOKENPROVIDER_RETURN_EMPTY_SAS_TOKEN, "true");
101+
// Setting IS_HNS_ENABLED to avoid the exception thrown by the HNS check.
99102
testConfig.set(FS_AZURE_ACCOUNT_IS_HNS_ENABLED, this.getIsNamespaceEnabled(fs) + "");
100103

101104
testFs.initialize(fs.getUri(), testConfig);
@@ -113,6 +116,7 @@ public void testSASTokenProviderNullSASToken() throws Exception {
113116
Configuration testConfig = new Configuration(this.getConfiguration().getRawConfiguration());
114117
testConfig.set(FS_AZURE_SAS_TOKEN_PROVIDER_TYPE, TEST_ERR_AUTHZ_CLASS);
115118
testConfig.set(MOCK_SASTOKENPROVIDER_RETURN_EMPTY_SAS_TOKEN, "true");
119+
// Setting IS_HNS_ENABLED to avoid the exception thrown by the HNS check.
116120
testConfig.set(FS_AZURE_ACCOUNT_IS_HNS_ENABLED, this.getIsNamespaceEnabled(fs) + "");
117121

118122
testFs.initialize(fs.getUri(), testConfig);

0 commit comments

Comments
 (0)