Repository: mesos Updated Branches: refs/heads/master 29236068f -> ac2e9e2ac
Moved `CHECK_NE` close to the `if (task.isSome())`. Review: https://reviews.apache.org/r/52069/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/ac2e9e2a Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/ac2e9e2a Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/ac2e9e2a Branch: refs/heads/master Commit: ac2e9e2aca5efd926712a4d2186be647fe9284c4 Parents: 2923606 Author: Guangya Liu <[email protected]> Authored: Mon Sep 19 17:08:10 2016 -0700 Committer: Vinod Kone <[email protected]> Committed: Mon Sep 19 17:08:10 2016 -0700 ---------------------------------------------------------------------- src/cli/execute.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/ac2e9e2a/src/cli/execute.cpp ---------------------------------------------------------------------- diff --git a/src/cli/execute.cpp b/src/cli/execute.cpp index f180672..79091d6 100644 --- a/src/cli/execute.cpp +++ b/src/cli/execute.cpp @@ -554,11 +554,9 @@ protected: { CHECK_EQ(SUBSCRIBED, state); - CHECK_NE(task.isSome(), taskGroup.isSome()) - << "Either task or task group should be set but not both"; - cout << "Received status update " << status.state() << " for task '" << status.task_id() << "'" << endl; + if (status.has_message()) { cout << " message: '" << status.message() << "'" << endl; } @@ -597,6 +595,9 @@ protected: } if (mesos::internal::protobuf::isTerminalState(devolve(status).state())) { + CHECK_NE(task.isSome(), taskGroup.isSome()) + << "Either task or task group should be set but not both"; + if (task.isSome()) { terminate(self()); } else {
