[
https://issues.apache.org/jira/browse/HADOOP-17823?focusedWorklogId=634259&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-634259
]
ASF GitHub Bot logged work on HADOOP-17823:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 05/Aug/21 11:31
Start Date: 05/Aug/21 11:31
Worklog Time Spent: 10m
Work Description: steveloughran commented on a change in pull request
#3263:
URL: https://github.com/apache/hadoop/pull/3263#discussion_r682642543
##########
File path:
hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/ITestS3AContractSeek.java
##########
@@ -143,7 +143,8 @@ protected AbstractFSContract createContract(Configuration
conf) {
public void teardown() throws Exception {
super.teardown();
S3AFileSystem fs = getFileSystem();
- if (fs.getConf().getBoolean(FS_S3A_IMPL_DISABLE_CACHE, false)) {
+ if (fs != null && fs.getConf().getBoolean(FS_S3A_IMPL_DISABLE_CACHE,
Review comment:
they are. IF test setup() fails then fs may be null, teardown will be
called and you'll see the error in teardown (here an NPE) rather than whatever
caused setup failure.
##########
File path:
hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/AbstractS3AMockTest.java
##########
@@ -58,7 +60,12 @@ public void setup() throws Exception {
Configuration conf = createConfiguration();
fs = new S3AFileSystem();
URI uri = URI.create(FS_S3A + "://" + BUCKET);
- fs.initialize(uri, conf);
+ try {
Review comment:
as this is a mock test, best to just remove the s3guard and cse settings
from the config we've created. No real FS should be involved.
We already set metastore to null in `createConfiguration()`.
##########
File path:
hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/S3AContract.java
##########
@@ -63,6 +68,22 @@ public S3AContract(Configuration conf, boolean
addContractResource) {
}
}
+ /**
+ * Skip S3AFS initialization if S3-CSE and S3Guard are enabled.
+ *
+ * @throws IOException throw IOE if it is not due to S3-CSE and S3Guard
Review comment:
doesn't any more; will throw `AssumptionViolatedException`
##########
File path:
hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/S3AContract.java
##########
@@ -63,6 +68,22 @@ public S3AContract(Configuration conf, boolean
addContractResource) {
}
}
+ /**
+ * Skip S3AFS initialization if S3-CSE and S3Guard are enabled.
+ *
+ * @throws IOException throw IOE if it is not due to S3-CSE and S3Guard
Review comment:
just cut the IOE reference
##########
File path:
hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/AbstractS3AMockTest.java
##########
@@ -58,7 +60,12 @@ public void setup() throws Exception {
Configuration conf = createConfiguration();
fs = new S3AFileSystem();
URI uri = URI.create(FS_S3A + "://" + BUCKET);
- fs.initialize(uri, conf);
+ try {
Review comment:
better to just remove the CSE settings. This is mock, there's no
communication to S3 at all, so no encryption taking place.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 634259)
Time Spent: 3h (was: 2h 50m)
> S3A Tests to skip if S3Guard and S3-CSE are enabled.
> ----------------------------------------------------
>
> Key: HADOOP-17823
> URL: https://issues.apache.org/jira/browse/HADOOP-17823
> Project: Hadoop Common
> Issue Type: Sub-task
> Components: build, fs/s3
> Affects Versions: 3.4.0
> Reporter: Mehakmeet Singh
> Assignee: Mehakmeet Singh
> Priority: Major
> Labels: pull-request-available
> Fix For: 3.4.0
>
> Time Spent: 3h
> Remaining Estimate: 0h
>
> Skip S3A tests when S3Guard and S3-CSE are enabled since it causes PathIOE
> otherwise.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]