hanishakoneru commented on pull request #3116:
URL: https://github.com/apache/ozone/pull/3116#issuecomment-1049283611
Thanks @adoroszlai for fixing this.
Patch LGTM.
I have a minor suggestion. The acceptance test looks great. Can we also add
a check in the integration test
`TestOzoneAtRestEncryption#testMultipartUploadWithEncryption` to verify that
the inputStream position is as expected after a read.
Something like this at line 531:
```
diff --git
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestOzoneAtRestEncryption.java
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestOzoneAtRestEncryption.java
index 4ebcc8745..a247b0e79 100644
---
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestOzoneAtRestEncryption.java
+++
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestOzoneAtRestEncryption.java
@@ -528,6 +528,9 @@ public void
testMultipartUploadWithEncryption(OzoneBucket bucket,
inputStream.read(readData, 0, readDataLen);
assertReadContent(inputData, readData, readFromPosition);
+ Assert.assertEquals("Position of CryptoInputStream after a read is
" +
+ "not as expected", readFromPosition + readDataLen,
+ cryptoInputStream.getPos());
}
}
}
```
It would be good if this test also checked reading the file consecutively
without reseting position. If not this, at least a check for verifying position
would be good to have.
--
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]