[
https://issues.apache.org/jira/browse/HADOOP-18403?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17581479#comment-17581479
]
ASF GitHub Bot commented on HADOOP-18403:
-----------------------------------------
virajjasani commented on code in PR #4737:
URL: https://github.com/apache/hadoop/pull/4737#discussion_r949454666
##########
hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3AAWSCredentialsProvider.java:
##########
@@ -162,12 +162,13 @@ public void testAnonymousProvider() throws Exception {
conf.set(AWS_CREDENTIALS_PROVIDER,
AnonymousAWSCredentialsProvider.class.getName());
Path testFile = getCSVTestPath(conf);
- FileSystem fs = FileSystem.newInstance(testFile.toUri(), conf);
- assertNotNull(fs);
- assertTrue(fs instanceof S3AFileSystem);
- FileStatus stat = fs.getFileStatus(testFile);
- assertNotNull(stat);
- assertEquals(testFile, stat.getPath());
+ try (FileSystem fs = FileSystem.newInstance(testFile.toUri(), conf)) {
+ assertNotNull(fs);
Review Comment:
Done, thanks @mukund-thakur
> Fix FileSystem leak in ITestS3AAWSCredentialsProvider
> -----------------------------------------------------
>
> Key: HADOOP-18403
> URL: https://issues.apache.org/jira/browse/HADOOP-18403
> Project: Hadoop Common
> Issue Type: Sub-task
> Components: fs/s3
> Reporter: Viraj Jasani
> Assignee: Viraj Jasani
> Priority: Minor
> Labels: pull-request-available
>
> ITestS3AAWSCredentialsProvider#testAnonymousProvider has FileSystem leak that
> should be fixed.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]