You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by st...@apache.org on 2020/04/14 09:58:38 UTC

[hadoop] branch branch-3.3 updated: HADOOP-16941. ITestS3GuardOutOfBandOperations.testListingDelete failing on versioned bucket (#1919)

This is an automated email from the ASF dual-hosted git repository.

stevel pushed a commit to branch branch-3.3
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/branch-3.3 by this push:
     new 68a9562  HADOOP-16941. ITestS3GuardOutOfBandOperations.testListingDelete failing on versioned bucket (#1919)
68a9562 is described below

commit 68a9562848912813bc3704521a935ff4eced03af
Author: Steve Loughran <st...@cloudera.com>
AuthorDate: Tue Apr 14 10:56:00 2020 +0100

    HADOOP-16941. ITestS3GuardOutOfBandOperations.testListingDelete failing on versioned bucket (#1919)
    
    Contributed by Steve Loughran.
    
    Removed the failing probe and replacing with two probes which will fail
    on both versioned and unversioned buckets.
---
 .../apache/hadoop/fs/s3a/ITestS3GuardOutOfBandOperations.java | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3GuardOutOfBandOperations.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3GuardOutOfBandOperations.java
index 70c62bf..32ead7f 100644
--- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3GuardOutOfBandOperations.java
+++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3GuardOutOfBandOperations.java
@@ -76,6 +76,7 @@ import static org.apache.hadoop.fs.s3a.S3ATestUtils.removeBaseAndBucketOverrides
 import static org.apache.hadoop.test.LambdaTestUtils.eventually;
 import static org.apache.hadoop.test.LambdaTestUtils.intercept;
 
+import static org.apache.hadoop.test.LambdaTestUtils.interceptFuture;
 import static org.junit.Assume.assumeTrue;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
@@ -964,6 +965,14 @@ public class ITestS3GuardOutOfBandOperations extends AbstractS3ATestBase {
       // Delete the file without S3Guard (raw)
       deleteFile(rawFS, testFilePath);
 
+      // now, versioned FS or not, it will not be readable from the
+      // raw FS, and this will fail in both open APIs during the open
+      // phase, rather than when a read is attempted.
+      interceptFuture(FileNotFoundException.class, "",
+          rawFS.openFile(testFilePath).build());
+      intercept(FileNotFoundException.class, () ->
+          rawFS.open(testFilePath).close());
+
       // File status will be still readable from s3guard
       S3AFileStatus status = (S3AFileStatus)
           guardedFs.getFileStatus(testFilePath);
@@ -985,8 +994,6 @@ public class ITestS3GuardOutOfBandOperations extends AbstractS3ATestBase {
         Assertions.assertThat(toChar(bytes))
             .describedAs("open(%s)", testFilePath)
             .isEqualTo(text);
-        expectExceptionWhenReadingOpenFileAPI(rawFS, testFilePath, text,
-            null);
       } else {
         // unversioned sequence
         expectExceptionWhenReading(testFilePath, text);


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