Mingliang Liu created HADOOP-14102:
--------------------------------------
Summary: Relax error message assertion in S3A test
ITestS3AEncryptionSSEC::testCreateFileAndReadWithDifferentEncryptionKey
Key: HADOOP-14102
URL: https://issues.apache.org/jira/browse/HADOOP-14102
Project: Hadoop Common
Issue Type: Test
Components: fs/s3
Reporter: Mingliang Liu
Assignee: Mingliang Liu
Priority: Trivial
[HADOOP-13075] added support for SSE-KMS and SSE-C in s3a filesystem, along
with integration test
{{ITestS3AEncryptionSSEC::testCreateFileAndReadWithDifferentEncryptionKey}}.
For {{AccessDeniedException}} test case, it assumes the error message contains
string _Forbidden (Service: Amazon S3; Status Code: 403;_, which is true in the
current AWS java sdk and current S3AFileSystem code path.
When enabling S3Guard (see feature JIRA [HADOOP-13345]), the code path that
fails in {{S3AFileSystem}} changes for that test. Specifically, the request w/o
S3Guard was calling {{getFileStatus()}} and fails with access denied exception
containing _Forbidden_ keyword; while the request w/ S3Guard is able to call
{{getFileStatus()}} successfully and then fails later for read operations with
access denied exception containing _Access Denied_ keyword.
AWS sdk does not provide the exactly same error message for different
AccessDeniedExceptions. In the meantime, the AWS sdk may evolve (as we have
been upgrading the sdk version recently in a timely manner) and the error
message may be different in the future. This is to relax exception message
assertion in test.
Thanks [~fabbri] for discussion. See [HADOOP-13075].
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]