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 6b2290b44d..1c8dd778f1 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 void testAssumeRoleRestrictedPolicyFS() throws Exception { // 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));