This is an automated email from the ASF dual-hosted git repository.

grag pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit 27f0cd3519bafaf058e8347d482475e776d494e1
Author: Greg Mann <g...@mesosphere.io>
AuthorDate: Mon Jul 15 10:25:47 2019 -0700

    Updated an equality operator.
    
    This patch updates the equality operator for the `Task`
    message to include two missing conditions. An equality
    operator for `HealthCheck` is also added to make this
    possible.
    
    Review: https://reviews.apache.org/r/70900/
---
 include/mesos/type_utils.hpp |  1 +
 src/common/type_utils.cpp    | 10 +++++++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/include/mesos/type_utils.hpp b/include/mesos/type_utils.hpp
index ed9190b..b9e6164 100644
--- a/include/mesos/type_utils.hpp
+++ b/include/mesos/type_utils.hpp
@@ -62,6 +62,7 @@ bool operator==(
 bool operator==(const DiscoveryInfo& left, const DiscoveryInfo& right);
 bool operator==(const Environment& left, const Environment& right);
 bool operator==(const ExecutorInfo& left, const ExecutorInfo& right);
+bool operator==(const HealthCheck& left, const HealthCheck& right);
 bool operator==(const Label& left, const Label& right);
 bool operator==(const Labels& left, const Labels& right);
 bool operator==(const MasterInfo& left, const MasterInfo& right);
diff --git a/src/common/type_utils.cpp b/src/common/type_utils.cpp
index a7eb0e9..16d6657 100644
--- a/src/common/type_utils.cpp
+++ b/src/common/type_utils.cpp
@@ -400,6 +400,12 @@ bool operator!=(const ExecutorInfo& left, const 
ExecutorInfo& right)
 }
 
 
+bool operator==(const HealthCheck& left, const HealthCheck& right)
+{
+  return google::protobuf::util::MessageDifferencer::Equals(left, right);
+}
+
+
 bool operator==(const MasterInfo& left, const MasterInfo& right)
 {
   return left.id() == right.id() &&
@@ -575,7 +581,9 @@ bool operator==(const Task& left, const Task& right)
     left.status_update_uuid() == right.status_update_uuid() &&
     left.labels() == right.labels() &&
     left.discovery() == right.discovery() &&
-    left.user() == right.user();
+    left.user() == right.user() &&
+    left.container() == right.container() &&
+    left.health_check() == right.health_check();
 }
 
 

Reply via email to