geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jensde...@apache.org
Subject [geode] branch develop updated: GEODE-5011: Status IGNORED is correctly processed in conjunction with ignoreIfFailed
Date Wed, 16 May 2018 04:24:19 GMT
This is an automated email from the ASF dual-hosted git repository.

jensdeppe pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/develop by this push:
     new bf0d41d  GEODE-5011: Status IGNORED is correctly processed in conjunction with ignoreIfFailed
bf0d41d is described below

commit bf0d41de4490de74653a80218075464bf98237a3
Author: Jens Deppe <jdeppe@pivotal.io>
AuthorDate: Tue May 15 21:24:05 2018 -0700

    GEODE-5011: Status IGNORED is correctly processed in conjunction with ignoreIfFailed
---
 .../management/internal/cli/functions/CliFunctionResult.java | 12 ++++++++----
 .../management/internal/cli/result/model/ResultModel.java    |  4 ++--
 2 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/CliFunctionResult.java
b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/CliFunctionResult.java
index c53754c..9aeaa7b 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/CliFunctionResult.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/CliFunctionResult.java
@@ -131,12 +131,16 @@ public class CliFunctionResult implements Comparable<CliFunctionResult>,
DataSer
     return (String) this.serializables[0];
   }
 
-  public String getStatus() {
-    if (isIgnorableFailure()) {
-      return "IGNORED";
+  public String getStatus(boolean allowIgnorableFailures) {
+    if (!allowIgnorableFailures && state == StatusState.IGNORED) {
+      return StatusState.ERROR.name();
     }
 
-    return isSuccessful() ? "OK" : "ERROR";
+    return getStatus();
+  }
+
+  public String getStatus() {
+    return state.name();
   }
 
   public String getStatusMessage() {
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/result/model/ResultModel.java
b/geode-core/src/main/java/org/apache/geode/management/internal/cli/result/model/ResultModel.java
index e0f5747..01972fc 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/result/model/ResultModel.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/result/model/ResultModel.java
@@ -307,8 +307,8 @@ public class ResultModel {
     tabularResultModel.setFooter(footer);
     tabularResultModel.setColumnHeader("Member", "Status", "Message");
     for (CliFunctionResult functionResult : functionResults) {
-      tabularResultModel.addRow(functionResult.getMemberIdOrName(), functionResult.getStatus(),
-          functionResult.getStatusMessage());
+      tabularResultModel.addRow(functionResult.getMemberIdOrName(),
+          functionResult.getStatus(ignoreIfFailed), functionResult.getStatusMessage());
       if (functionResult.isSuccessful()) {
         atLeastOneSuccess = true;
       }

-- 
To stop receiving notification emails like this one, please contact
jensdeppe@apache.org.

Mime
View raw message