You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2020/08/22 12:13:36 UTC

[GitHub] [hadoop] steveloughran commented on a change in pull request #2202: HADOOP-17191. ABFS: Run tests with all AuthTypes

steveloughran commented on a change in pull request #2202:
URL: https://github.com/apache/hadoop/pull/2202#discussion_r475083365



##########
File path: hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/contract/ITestAbfsFileSystemContractGetFileStatus.java
##########
@@ -17,35 +17,55 @@
  */
 package org.apache.hadoop.fs.azurebfs.contract;
 
+import org.junit.Rule;
+
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.azurebfs.rules.AbfsTestsRule;
+import org.apache.hadoop.fs.azurebfs.rules.AbfsTestable;
 import org.apache.hadoop.fs.contract.AbstractContractGetFileStatusTest;
 import org.apache.hadoop.fs.contract.AbstractFSContract;
 
 /**
  * Contract test for getFileStatus operation.
  */
-public class ITestAbfsFileSystemContractGetFileStatus extends AbstractContractGetFileStatusTest {
-  private final boolean isSecure;
+public class ITestAbfsFileSystemContractGetFileStatus
+    extends AbstractContractGetFileStatusTest implements AbfsTestable {
+  private boolean isSecure;
   private final ABFSContractTestBinding binding;
 
+  @Rule
+  public AbfsTestsRule abfsTestsRule = new AbfsTestsRule(this);
+
   public ITestAbfsFileSystemContractGetFileStatus() throws Exception {
     binding = new ABFSContractTestBinding();
-    this.isSecure = binding.isSecureMode();
   }
 
   @Override
   public void setup() throws Exception {
     binding.setup();
+    this.isSecure = binding.isSecureMode();
     super.setup();
   }
 
   @Override
-  protected Configuration createConfiguration() {
-    return this.binding.getRawConfiguration();
+  protected int getTestTimeoutMillis() {
+    return 3 * 180000;

Review comment:
       why the change? and use 9 * 60_000 for readability 

##########
File path: hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/contract/AbfsFileSystemContract.java
##########
@@ -19,11 +19,14 @@
 package org.apache.hadoop.fs.azurebfs.contract;
 
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.fs.azurebfs.constants.FileSystemUriSchemes;
 import org.apache.hadoop.fs.azurebfs.utils.UriUtils;
 import org.apache.hadoop.fs.contract.AbstractBondedFSContract;
 
+import java.io.IOException;

Review comment:
       import ordering

##########
File path: hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsRestOperation.java
##########
@@ -214,6 +214,8 @@ private boolean executeHttpOperation(final int retryCount) throws AzureBlobFileS
       httpOperation = new AbfsHttpOperation(url, method, requestHeaders);
       incrementCounter(AbfsStatistic.CONNECTIONS_MADE, 1);
 
+      LOG.error("{}.{}", client.getAuthType(), url);

Review comment:
       ???
   

##########
File path: hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestAbfsClient.java
##########
@@ -54,6 +55,10 @@ public ITestAbfsClient() throws Exception {
     super();
   }
 
+  protected int getTestTimeoutMillis() {
+    return 3 * TEST_TIMEOUT;

Review comment:
       really that long? Why the hard coding
   

##########
File path: hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestAzureBlobFilesystemAcl.java
##########
@@ -18,16 +18,17 @@
 
 package org.apache.hadoop.fs.azurebfs;
 
-import com.google.common.collect.Lists;
-
 import java.io.FileNotFoundException;
 import java.util.List;
 import java.util.UUID;
 
 import org.junit.Assume;
 import org.junit.Ignore;
 import org.junit.Test;
+import com.google.common.collect.Lists;

Review comment:
       import reordering. Once in, best to leave alone unless you enjoy more merge pain than normal.

##########
File path: hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/AbstractAbfsIntegrationTest.java
##########
@@ -25,13 +25,19 @@
 import java.util.UUID;
 import java.util.concurrent.Callable;
 
+import org.apache.hadoop.fs.azurebfs.constants.TestConfigurationKeys;

Review comment:
       import ordering

##########
File path: hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/constants/TestConfigurationKeys.java
##########
@@ -23,9 +23,12 @@
  */
 public final class TestConfigurationKeys {
   public static final String FS_AZURE_ACCOUNT_NAME = "fs.azure.account.name";
+  public static final String FS_AZURE_ABFS_HNS_ACCOUNT_NAME = "fs.azure.hns.abfs.account.name";

Review comment:
       javadocs please
   

##########
File path: hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/rules/package-info.java
##########
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+@InterfaceAudience.Private
+@InterfaceStability.Evolving
+package org.apache.hadoop.fs.azurebfs.rules;

Review comment:
       add a javadoc to describe package
   

##########
File path: hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/AbstractAbfsIntegrationTest.java
##########
@@ -50,20 +56,24 @@
 import org.apache.hadoop.fs.permission.FsPermission;
 import org.apache.hadoop.io.IOUtils;
 
+import static org.junit.Assume.assumeTrue;

Review comment:
       avoid import reordering




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org