Skip to content

Commit 68bc721

Browse files
HADOOP-17433. Skipping network I/O in S3A getFileStatus(/) breaks ITestAssumeRole. (#2600)
Contributed by Steve Loughran.
1 parent a326f22 commit 68bc721

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,8 +394,10 @@ public void testAssumeRoleRestrictedPolicyFS() throws Exception {
394394
// when S3Guard is enabled, the restricted policy still
395395
// permits S3Guard record lookup, so getFileStatus calls
396396
// will work iff the record is in the database.
397+
// probe the store using a path other than /, so a HEAD
398+
// request is issued.
397399
forbidden("getFileStatus",
398-
() -> fs.getFileStatus(ROOT));
400+
() -> fs.getFileStatus(methodPath()));
399401
}
400402
forbidden("",
401403
() -> fs.listStatus(ROOT));

0 commit comments

Comments
 (0)