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


##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshot.java:
##########
@@ -194,6 +204,69 @@ private void init() throws Exception {
 
     // stop the deletion services so that keys can still be read
     keyManager.stop();
+    preFinalizationChecks();
+    finalizeOMUpgrade();
+  }
+
+  private static void expectFailurePreFinalization(LambdaTestUtils.
+      VoidCallable eval) throws Exception {
+    OMException ex  = Assert.assertThrows(OMException.class,
+            () -> eval.call());
+    Assert.assertTrue(ex.getMessage().contains(
+            "cannot be invoked before finalization."));
+  }

Review Comment:
   ```suggestion
     private static void expectFailurePreFinalization(LambdaTestUtils.
         VoidCallable eval) {
       OMException ex = Assert.assertThrows(OMException.class, eval::call);
       Assert.assertEquals(NOT_SUPPORTED_OPERATION_PRIOR_FINALIZATION,
           ex.getResult());
       Assert.assertTrue(ex.getMessage().contains(
           "cannot be invoked before finalization."));
     }
   ```



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