steveloughran commented on code in PR #6479: URL: https://github.com/apache/hadoop/pull/6479#discussion_r1474310333
########## hadoop-tools/hadoop-aws/src/site/markdown/tools/hadoop-aws/index.md: ########## @@ -228,6 +228,8 @@ If you do any of these: change your credentials immediately! See [Connecting to an Amazon S3 Bucket through the S3A Connector](connecting.md). Review Comment: that should end with .html (I know, not your change. mine) ########## hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3AEndpointRegion.java: ########## @@ -345,8 +385,27 @@ private void assertOpsUsingNewFs() throws IOException { out.write(new byte[] {1, 2, 3}); } - ContractTestUtils.assertIsFile(getFileSystem(), srcFilePath); - ContractTestUtils.assertIsFile(newFS, srcFilePath); + Assertions + .assertThat(newFS.exists(srcFilePath)) + .describedAs("Existence of file: " + srcFilePath) + .isTrue(); + Assertions + .assertThat(getFileSystem().exists(srcFilePath)) + .describedAs("Existence of file: " + srcFilePath) + .isTrue(); + + byte[] buffer = new byte[3]; + + try (FSDataInputStream in = newFS.open(srcFilePath)) { + Assertions + .assertThat(in.read(buffer, 0, 3)) Review Comment: use readFully() and skip the assert. read() can return 0-3 so brittle on slow networks -- 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: common-issues-unsubscr...@hadoop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org