xBis7 commented on PR #3794:
URL: https://github.com/apache/ozone/pull/3794#issuecomment-1321851780

   @errose28 The point is not the `ClientVersion` but the `BucketLayout` used 
due to the version. All the existing tests are covering [this code 
block](https://github.com/xBis7/ozone/blob/HDDS-7280/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/bucket/OMBucketCreateRequest.java#L275-L285).
 The purpose of the test changes is to have a setup that covers the [rest of 
this 
method](https://github.com/xBis7/ozone/blob/HDDS-7280/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/bucket/OMBucketCreateRequest.java#L285-L298).
   
   > Can we just update OMRequestTestUtils to pass the latest client version in 
createBucketRequest and createBucketReqFSO without the other changes? It looks 
like the tests calling these methods still pass as expected with just this one 
change.
   
   If you take a look at `OMBucketCreateRequest.getDefaultBucketLayout()` you 
will see that these test methods are expecting to default to 
`BucketLayout.LEGACY` due to the old ClientVersion. Right now, the system 
default is also LEGACY which makes all the tests pass. What if the system 
default changes? Then all the tests, which will be using the latest 
ClientVersion will get the bucket layout from the config which will be OBS or 
FSO but still expect to get LEGACY, like 
[here](https://github.com/xBis7/ozone/blob/HDDS-7280/hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/request/bucket/TestOMBucketCreateRequest.java#L141-L142).
 
   
   If we change the ClientVersion to use the latest, someone would have to fix 
the tests later. 
   
   


-- 
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]

Reply via email to