snvijaya commented on a change in pull request #2698:
URL: https://github.com/apache/hadoop/pull/2698#discussion_r581641007
##########
File path:
hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestAbfsInputStreamStatistics.java
##########
@@ -100,28 +100,31 @@ public void testSeekStatistics() throws IOException {
AbfsOutputStream out = null;
AbfsInputStream in = null;
+ int readBufferSize = getConfiguration().getReadBufferSize();
Review comment:
Maybe we can reduce the diff on the test by reducing the bufferSize on
the filesystem instance so that rest of the asserts remain valid.
##########
File path:
hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestAzureBlobFileSystemRandomRead.java
##########
@@ -402,6 +400,18 @@ public void testSkipAndAvailableAndPosition() throws
Exception {
inputStream.getPos());
assertEquals(testFileLength - inputStream.getPos(),
inputStream.available());
+
+ skipped = inputStream.skip(testFileLength + 1); //goes to last byte
+ assertEquals(1, inputStream.available());
+ bytesRead = inputStream.read(buffer);
+ assertEquals(1, bytesRead);
+ assertEquals(testFileLength, inputStream.getPos());
Review comment:
getPos() is a public API of InputStream. Does this mean that it can
return an invalid position value ?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]