neils-dev commented on code in PR #3750:
URL: https://github.com/apache/ozone/pull/3750#discussion_r971210510
##########
hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/request/OMRequestTestUtils.java:
##########
@@ -531,7 +531,8 @@ public static void addBucketToDB(String volumeName, String
bucketName,
public static OzoneManagerProtocolProtos.OMRequest createBucketRequest(
String bucketName, String volumeName, boolean isVersionEnabled,
- OzoneManagerProtocolProtos.StorageTypeProto storageTypeProto) {
+ OzoneManagerProtocolProtos.StorageTypeProto storageTypeProto,
+ int clientVersion) {
Review Comment:
Is the `clientVersion` necessary for the tests, or can we just use the
static from `ClientVersion`?
##########
hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/request/bucket/TestOMBucketCreateRequest.java:
##########
@@ -76,7 +76,7 @@ public void testValidateAndUpdateCacheWithNoVolume() throws
Exception {
String bucketName = UUID.randomUUID().toString();
OMRequest originalRequest = OMRequestTestUtils.createBucketRequest(
- bucketName, volumeName, false, StorageTypeProto.SSD);
+ bucketName, volumeName, false, StorageTypeProto.SSD, 0);
Review Comment:
Same comment as previous on clientversion: 0 replaced with`
ClientVersion.CURRENT_VERSION`.
##########
hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/ratis/TestOzoneManagerDoubleBufferWithOMResponse.java:
##########
@@ -469,7 +469,7 @@ private OMBucketCreateResponse createBucket(String
volumeName,
OzoneManagerProtocolProtos.OMRequest omRequest =
OMRequestTestUtils.createBucketRequest(bucketName, volumeName, false,
- OzoneManagerProtocolProtos.StorageTypeProto.DISK);
+ OzoneManagerProtocolProtos.StorageTypeProto.DISK, 0);
Review Comment:
Is it necessary to change the TestUtils `createBucketRequest `interface to
include the client version? Or can we just set it within the tests when needed
with the static variable `ClientVersion.CURRENT_VERSION`?
If we leave the interface changed to include the clientVersion (line 535),
change the call in line 472 from
`OzoneManagerProtocolProtos.StorageTypeProto.DISK, 0`) to
`OzoneManagerProtocolProtos.StorageTypeProto.DISK,
ClientVersion.CURRENT_VERSION`)
##########
hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/request/TestOMClientRequestWithUserInfo.java:
##########
@@ -95,7 +95,7 @@ public void testUserInfo() throws Exception {
String volumeName = UUID.randomUUID().toString();
OzoneManagerProtocolProtos.OMRequest omRequest =
OMRequestTestUtils.createBucketRequest(bucketName, volumeName, true,
- OzoneManagerProtocolProtos.StorageTypeProto.DISK);
+ OzoneManagerProtocolProtos.StorageTypeProto.DISK, 0);
Review Comment:
Change the constant 0 to use the `ClientVersion.CURRENT_VERSION` if possible.
##########
hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/request/bucket/TestOMBucketCreateRequest.java:
##########
@@ -145,7 +145,7 @@ private OMBucketCreateRequest doPreExecute(String
volumeName,
addCreateVolumeToTable(volumeName, omMetadataManager);
OMRequest originalRequest =
OMRequestTestUtils.createBucketRequest(bucketName, volumeName, false,
- StorageTypeProto.SSD);
+ StorageTypeProto.SSD, 0);
Review Comment:
clientVersion set from 0 to `ClientVersion.CURRENT_VERSION`
--
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]