You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2021/03/31 04:07:33 UTC

[GitHub] [ozone] prashantpogde commented on a change in pull request #1998: HDDS-4914. Failure injection and validating HDDS upgrade.

prashantpogde commented on a change in pull request #1998:
URL: https://github.com/apache/ozone/pull/1998#discussion_r604579459



##########
File path: hadoop-hdds/common/src/main/java/org/apache/hadoop/ozone/upgrade/BasicUpgradeFinalizer.java
##########
@@ -303,4 +306,26 @@ private void logAndThrow(Exception e, String msg, ResultCodes resultCode)
     LOG.error(msg, e);
     throw new UpgradeException(msg, e, resultCode);
   }
+
+  @Override
+  public void configureTestInjectionFunction(
+      UpgradeTestInjectionPoints pointIndex,
+      Callable<Boolean> injectedTestFunction) {
+    injectTestFunction = injectedTestFunction;
+    testInjectionPoint = pointIndex;
+  }
+
+  @Override
+  public Boolean injectTestFunctionAtThisPoint(
+      UpgradeTestInjectionPoints pointIndex) throws Exception {
+    if ((testInjectionPoint != null) &&
+        (pointIndex.getValue() == testInjectionPoint.getValue())) {
+      if (injectTestFunction != null) {

Review comment:
       done




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org