GeorgeJahad commented on a change in pull request #2703:
URL: https://github.com/apache/ozone/pull/2703#discussion_r720868652



##########
File path: 
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmMetrics.java
##########
@@ -442,64 +453,59 @@ private void testAclMetricsInternal(ObjectStore 
objectStore, OzoneObj volObj,
   /**
    * Test volume operations with ignoring thrown exception.
    */
-  private void doVolumeOps() {
+  private void doVolumeOps(OmVolumeArgs volumeArgs) {

Review comment:
       The old mocks enabled this method to be written incorrectly.  The method 
as written was not aligned with the metrics returned.  The delete happens early 
in the method and should cause the subsequent calls to fail, but the metrics 
expected then all to succeed.
   
   
   So I restructured this method to match the counts, by moving the delete to 
the end.  I also removed the checkVolumeAccess that no longer exists, and added 
the correct arguments that were previously mocked out.  The diffs here make the 
changes look more significant than they here.  They really look like this:
   |original                |current                 |
   |------------------------|------------------------|
   |createVolume            |createVolume            |
   |deleteVolume            |[moved to end]                       |
   |getVolumeInfo           |getVolumeInfo           |
   |checkVolumeAccess       |[removed]                       |
   |setOwner                |setOwner                |
   |listAllVolumes          |listAllVolumes          |
   |                        |deleteVolume            |
   
   




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