Updated default executor to set `healthy` status in status update.

Right now the executor always sets the health status as true. In the
future this will be based on the health checker.

Review: https://reviews.apache.org/r/52107


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/e28f197e
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/e28f197e
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/e28f197e

Branch: refs/heads/master
Commit: e28f197ee223d2826b70d59b9efedc140b714f3f
Parents: a6dfbbb
Author: Vinod Kone <vinodk...@gmail.com>
Authored: Tue Sep 20 17:36:34 2016 -0700
Committer: Vinod Kone <vinodk...@gmail.com>
Committed: Tue Sep 20 20:27:11 2016 -0700

----------------------------------------------------------------------
 src/launcher/default_executor.cpp    | 3 +++
 src/tests/default_executor_tests.cpp | 1 +
 2 files changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/e28f197e/src/launcher/default_executor.cpp
----------------------------------------------------------------------
diff --git a/src/launcher/default_executor.cpp 
b/src/launcher/default_executor.cpp
index 53e27c9..ef63edc 100644
--- a/src/launcher/default_executor.cpp
+++ b/src/launcher/default_executor.cpp
@@ -241,6 +241,9 @@ private:
       status.set_message(message.get());
     }
 
+    // TODO(vinod): Implement health checks.
+    status.set_healthy(true);
+
     Call call;
     call.set_type(Call::UPDATE);
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/e28f197e/src/tests/default_executor_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/default_executor_tests.cpp 
b/src/tests/default_executor_tests.cpp
index b39877c..6a0b011 100644
--- a/src/tests/default_executor_tests.cpp
+++ b/src/tests/default_executor_tests.cpp
@@ -142,6 +142,7 @@ TEST_F(DefaultExecutorTest, TaskRunning)
 
   ASSERT_EQ(TASK_RUNNING, update->status().state());
   EXPECT_EQ(taskInfo.task_id(), update->status().task_id());
+  EXPECT_TRUE(update->status().healthy());
 }
 
 } // namespace tests {

Reply via email to