steveloughran commented on code in PR #7104:
URL: https://github.com/apache/hadoop/pull/7104#discussion_r1795416489


##########
hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestAzureBlobFileSystemAuthorization.java:
##########
@@ -65,8 +67,8 @@ public void setup() throws Exception {
         TestConfigurationKeys.FS_AZURE_TEST_NAMESPACE_ENABLED_ACCOUNT, false);
     Assume.assumeTrue(isHNSEnabled);
     loadConfiguredFileSystem();
-    
this.getConfiguration().set(ConfigurationKeys.FS_AZURE_SAS_TOKEN_PROVIDER_TYPE, 
TEST_AUTHZ_CLASS);
-    
this.getConfiguration().set(ConfigurationKeys.FS_AZURE_ACCOUNT_AUTH_TYPE_PROPERTY_NAME,
 "SAS");
+    this.getConfiguration().set(FS_AZURE_SAS_TOKEN_PROVIDER_TYPE, 
TEST_AUTHZ_CLASS);

Review Comment:
   cut the `this.`



##########
hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestAbfsRestOperationException.java:
##########
@@ -201,4 +183,20 @@ public void testAuthFailException() throws Exception {
         .describedAs("Incorrect error message: " + errorDesc)
         .contains("Auth failure: ");
   }
+
+  private Configuration getEntries(final int numOfRetries) {
+    Configuration config = new Configuration(this.getRawConfiguration());
+    String accountName = config.get(FS_AZURE_ABFS_ACCOUNT_NAME);
+    // Setup to configure custom token provider.
+    config.set(accountProperty(FS_AZURE_ACCOUNT_AUTH_TYPE_PROPERTY_NAME, 
accountName), "Custom");
+    
config.set(accountProperty(FS_AZURE_ACCOUNT_TOKEN_PROVIDER_TYPE_PROPERTY_NAME, 
accountName),
+        RETRY_TEST_TOKEN_PROVIDER);
+    config.set(AZURE_CUSTOM_TOKEN_FETCH_RETRY_COUNT, Integer.toString(
+        numOfRetries));
+    // Stop filesystem creation as it will lead to calls to store.
+    config.set(AZURE_CREATE_REMOTE_FILESYSTEM_DURING_INITIALIZATION, "false");

Review Comment:
   setInteger



##########
hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestAbfsRestOperationException.java:
##########
@@ -201,4 +183,20 @@ public void testAuthFailException() throws Exception {
         .describedAs("Incorrect error message: " + errorDesc)
         .contains("Auth failure: ");
   }
+
+  private Configuration getEntries(final int numOfRetries) {
+    Configuration config = new Configuration(this.getRawConfiguration());
+    String accountName = config.get(FS_AZURE_ABFS_ACCOUNT_NAME);
+    // Setup to configure custom token provider.
+    config.set(accountProperty(FS_AZURE_ACCOUNT_AUTH_TYPE_PROPERTY_NAME, 
accountName), "Custom");
+    
config.set(accountProperty(FS_AZURE_ACCOUNT_TOKEN_PROVIDER_TYPE_PROPERTY_NAME, 
accountName),
+        RETRY_TEST_TOKEN_PROVIDER);
+    config.set(AZURE_CUSTOM_TOKEN_FETCH_RETRY_COUNT, Integer.toString(
+        numOfRetries));
+    // Stop filesystem creation as it will lead to calls to store.
+    config.set(AZURE_CREATE_REMOTE_FILESYSTEM_DURING_INITIALIZATION, "false");
+    config.set(FS_AZURE_ACCOUNT_IS_HNS_ENABLED, config.getBoolean(

Review Comment:
   setBoolean



##########
hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/contract/ITestAbfsFileSystemContractSeek.java:
##########
@@ -68,6 +68,9 @@ protected Configuration createConfiguration() {
   protected AbstractFSContract createContract(final Configuration conf) {
     conf.setInt(AZURE_READ_AHEAD_RANGE, MIN_BUFFER_SIZE);
     conf.setInt(AZURE_READ_BUFFER_SIZE, MIN_BUFFER_SIZE);
+    // Disabling cache to make sure new configs are picked up.

Review Comment:
   pull out into an azure test utils class, just as 
`S3ATestUtils.disableFilesystemCaching()does



##########
hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestAbfsRestOperationException.java:
##########
@@ -201,4 +183,20 @@ public void testAuthFailException() throws Exception {
         .describedAs("Incorrect error message: " + errorDesc)
         .contains("Auth failure: ");
   }
+
+  private Configuration getEntries(final int numOfRetries) {

Review Comment:
   nit: javadoc



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