Преглед на файлове

HADOOP-17433. Skipping network I/O in S3A getFileStatus(/) breaks ITestAssumeRole. (#2600)

Contributed by Steve Loughran.
Steve Loughran преди 4 години
родител
ревизия
68bc721841
променени са 1 файла, в които са добавени 3 реда и са изтрити 1 реда
  1. 3 1
      hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/auth/ITestAssumeRole.java

+ 3 - 1
hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/auth/ITestAssumeRole.java

@@ -394,8 +394,10 @@ public class ITestAssumeRole extends AbstractS3ATestBase {
         // when S3Guard is enabled, the restricted policy still
         // when S3Guard is enabled, the restricted policy still
         // permits S3Guard record lookup, so getFileStatus calls
         // permits S3Guard record lookup, so getFileStatus calls
         // will work iff the record is in the database.
         // will work iff the record is in the database.
+        // probe the store using a path other than /, so a HEAD
+        // request is issued.
         forbidden("getFileStatus",
         forbidden("getFileStatus",
-            () -> fs.getFileStatus(ROOT));
+            () -> fs.getFileStatus(methodPath()));
       }
       }
       forbidden("",
       forbidden("",
           () -> fs.listStatus(ROOT));
           () -> fs.listStatus(ROOT));