mukund-thakur commented on code in PR #4737:
URL: https://github.com/apache/hadoop/pull/4737#discussion_r949414334
##########
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:
Now as you are fixing this already, why don't we add error messages in the
assert statements for better error reporting. thx.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]