From b645e58de295baf99651da1c31fc440bac651cbb Mon Sep 17 00:00:00 2001 From: Steve Loughran Date: Tue, 19 Jan 2021 17:19:27 +0000 Subject: [PATCH] HADOOP-17433. Skipping network I/O in S3A getFileStatus(/) breaks ITestAssumeRole. (#2600) Contributed by Steve Loughran. Change-Id: Iece617be78e80fc7e956074eddf171f7763a2e66 --- .../java/org/apache/hadoop/fs/s3a/auth/ITestAssumeRole.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/auth/ITestAssumeRole.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/auth/ITestAssumeRole.java index 6b2290b44df..1c8dd778f10 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/auth/ITestAssumeRole.java +++ b/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 // permits S3Guard record lookup, so getFileStatus calls // 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", - () -> fs.getFileStatus(ROOT)); + () -> fs.getFileStatus(methodPath())); } forbidden("", () -> fs.listStatus(ROOT));