errose28 commented on code in PR #4634:
URL: https://github.com/apache/ozone/pull/4634#discussion_r1186451106


##########
hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/request/key/TestOMKeyRequest.java:
##########
@@ -134,7 +135,9 @@ public void setup() throws Exception {
     when(ozoneManager.getMetadataManager()).thenReturn(omMetadataManager);
     when(ozoneManager.getConfiguration()).thenReturn(ozoneConfiguration);
     OMLayoutVersionManager lvm = mock(OMLayoutVersionManager.class);
-    when(lvm.getMetadataLayoutVersion()).thenReturn(0);
+    when(lvm.getMetadataLayoutVersion()).thenReturn(5);
+    when(lvm.getFeature(any())).thenReturn(OMLayoutFeature.SNAPSHOT_SUPPORT);
+    when(lvm.isAllowed(anyString())).thenReturn(true);

Review Comment:
   Same comment on the other tests, can we remove all layout version manager 
mocking or do things break?



##########
hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/request/key/TestOMKeyRequest.java:
##########
@@ -134,7 +135,9 @@ public void setup() throws Exception {
     when(ozoneManager.getMetadataManager()).thenReturn(omMetadataManager);
     when(ozoneManager.getConfiguration()).thenReturn(ozoneConfiguration);
     OMLayoutVersionManager lvm = mock(OMLayoutVersionManager.class);
-    when(lvm.getMetadataLayoutVersion()).thenReturn(0);
+    when(lvm.getMetadataLayoutVersion()).thenReturn(5);
+    when(lvm.getFeature(any())).thenReturn(OMLayoutFeature.SNAPSHOT_SUPPORT);
+    when(lvm.isAllowed(anyString())).thenReturn(true);

Review Comment:
   I think we can delete this. Does the test fail without this? Even the layout 
version manager mocking in the original code is unnecessary I'm pretty sure. I 
think it was left over from early upgrade work.



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