tanvipenumudy commented on code in PR #6799:
URL: https://github.com/apache/ozone/pull/6799#discussion_r1633567378
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestOzoneRpcClientAbstract.java:
##########
@@ -1105,45 +1107,54 @@ public void testPutKey() throws IOException {
void rewriteKey(BucketLayout layout) throws IOException {
OzoneBucket bucket = createBucket(layout);
OzoneKeyDetails keyDetails = createTestKey(bucket);
+ OmKeyArgs keyArgs = toOmKeyArgs(keyDetails);
+ OmKeyInfo keyInfo = ozoneManager.lookupKey(keyArgs);
final byte[] newContent = "rewrite value".getBytes(UTF_8);
rewriteKey(bucket, keyDetails, newContent);
OzoneKeyDetails actualKeyDetails = assertKeyContent(bucket,
keyDetails.getName(), newContent);
assertThat(actualKeyDetails.getGeneration()).isGreaterThan(keyDetails.getGeneration());
- assertEquals(keyDetails.getOwner(), actualKeyDetails.getOwner());
+ assertMetadataUnchanged(keyDetails, actualKeyDetails);
+ assertMetadataAfterRewrite(keyInfo, ozoneManager.lookupKey(keyArgs));
}
@ParameterizedTest
@EnumSource
void overwriteAfterRewrite(BucketLayout layout) throws IOException {
OzoneBucket bucket = createBucket(layout);
OzoneKeyDetails keyDetails = createTestKey(bucket);
+ OmKeyArgs keyArgs = toOmKeyArgs(keyDetails);
Review Comment:
NIT: I think we can remove this line since it is not being used.
```suggestion
```
--
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]