You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by an...@apache.org on 2016/12/13 18:53:54 UTC

[1/2] mesos git commit: Acked correct task id in DefaultExecutorTest.KillTaskGroupOnTaskFailure.

Repository: mesos
Updated Branches:
  refs/heads/master a0e30a047 -> f542c2940


Acked correct task id in DefaultExecutorTest.KillTaskGroupOnTaskFailure.

When acknowledging task status updates, this test was erroneously
using a cached task id instead of the actual task id sent in the
status update. This can lead to failed acknowledgements when
status updates appear in different order.

This patch just uses the task id sent as part of the status update in
the acknowledgement.

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


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

Branch: refs/heads/master
Commit: 119c4399ab4dc5c976c1918942f4add440e2cfc9
Parents: a0e30a0
Author: Benjamin Bannier <be...@mesosphere.io>
Authored: Tue Dec 13 10:50:59 2016 -0800
Committer: Anand Mazumdar <an...@apache.org>
Committed: Tue Dec 13 10:50:59 2016 -0800

----------------------------------------------------------------------
 src/tests/default_executor_tests.cpp | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/119c4399/src/tests/default_executor_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/default_executor_tests.cpp b/src/tests/default_executor_tests.cpp
index a88796b..c92b8fe 100644
--- a/src/tests/default_executor_tests.cpp
+++ b/src/tests/default_executor_tests.cpp
@@ -565,7 +565,10 @@ TEST_F(DefaultExecutorTest, KillTaskGroupOnTaskFailure)
     call.set_type(Call::ACKNOWLEDGE);
 
     Call::Acknowledge* acknowledge = call.mutable_acknowledge();
-    acknowledge->mutable_task_id()->CopyFrom(taskInfo1.task_id());
+
+    acknowledge->mutable_task_id()->CopyFrom(
+        runningUpdate1->status().task_id());
+
     acknowledge->mutable_agent_id()->CopyFrom(offer.agent_id());
     acknowledge->set_uuid(runningUpdate1->status().uuid());
 
@@ -578,7 +581,10 @@ TEST_F(DefaultExecutorTest, KillTaskGroupOnTaskFailure)
     call.set_type(Call::ACKNOWLEDGE);
 
     Call::Acknowledge* acknowledge = call.mutable_acknowledge();
-    acknowledge->mutable_task_id()->CopyFrom(taskInfo2.task_id());
+
+    acknowledge->mutable_task_id()->CopyFrom(
+        runningUpdate2->status().task_id());
+
     acknowledge->mutable_agent_id()->CopyFrom(offer.agent_id());
     acknowledge->set_uuid(runningUpdate2->status().uuid());
 


[2/2] mesos git commit: Acked correct task id in DefaultExecutorTest.KillTask test.

Posted by an...@apache.org.
Acked correct task id in DefaultExecutorTest.KillTask test.

When acknowledging task status updates, this test was erroneously
using a cached task id instead of the actual task id sent in the
status update. This can lead to failed acknowledgements when
status updates appear in different order.

This patch just uses the task id sent as part of the status update in
the acknowledgement.

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


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

Branch: refs/heads/master
Commit: f542c29400f5be390668003b865b5b69f0ff0894
Parents: 119c439
Author: Benjamin Bannier <be...@mesosphere.io>
Authored: Tue Dec 13 10:52:15 2016 -0800
Committer: Anand Mazumdar <an...@apache.org>
Committed: Tue Dec 13 10:52:15 2016 -0800

----------------------------------------------------------------------
 src/tests/default_executor_tests.cpp | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/f542c294/src/tests/default_executor_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/default_executor_tests.cpp b/src/tests/default_executor_tests.cpp
index c92b8fe..d5a186e 100644
--- a/src/tests/default_executor_tests.cpp
+++ b/src/tests/default_executor_tests.cpp
@@ -374,7 +374,10 @@ TEST_P(DefaultExecutorTest, KillTask)
     call.set_type(Call::ACKNOWLEDGE);
 
     Call::Acknowledge* acknowledge = call.mutable_acknowledge();
-    acknowledge->mutable_task_id()->CopyFrom(taskInfo1.task_id());
+
+    acknowledge->mutable_task_id()->CopyFrom(
+        runningUpdate1->status().task_id());
+
     acknowledge->mutable_agent_id()->CopyFrom(offer.agent_id());
     acknowledge->set_uuid(runningUpdate1->status().uuid());
 
@@ -387,7 +390,10 @@ TEST_P(DefaultExecutorTest, KillTask)
     call.set_type(Call::ACKNOWLEDGE);
 
     Call::Acknowledge* acknowledge = call.mutable_acknowledge();
-    acknowledge->mutable_task_id()->CopyFrom(taskInfo2.task_id());
+
+    acknowledge->mutable_task_id()->CopyFrom(
+        runningUpdate2->status().task_id());
+
     acknowledge->mutable_agent_id()->CopyFrom(offer.agent_id());
     acknowledge->set_uuid(runningUpdate2->status().uuid());