You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by al...@apache.org on 2017/12/13 17:55:03 UTC

mesos git commit: Removed race from SlaveRecoveryTest.ReconnectExecutor.

Repository: mesos
Updated Branches:
  refs/heads/master 4695ac0c2 -> a6b0f59b5


Removed race from SlaveRecoveryTest.ReconnectExecutor.

Since the executor now sends two status updates in potentially
rapid progression, there was a race where the slave successfully
received a TASK_RUNNING update before shutting down, throwing off
the later checks.

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


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

Branch: refs/heads/master
Commit: a6b0f59b5c2993052e1bcf27f8e1ed1fc59f7192
Parents: 4695ac0
Author: Benno Evers <be...@mesosphere.com>
Authored: Wed Dec 13 18:53:28 2017 +0100
Committer: Alexander Rukletsov <al...@apache.org>
Committed: Wed Dec 13 18:53:28 2017 +0100

----------------------------------------------------------------------
 src/tests/slave_recovery_tests.cpp | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/a6b0f59b/src/tests/slave_recovery_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/slave_recovery_tests.cpp b/src/tests/slave_recovery_tests.cpp
index fdc4b06..555f186 100644
--- a/src/tests/slave_recovery_tests.cpp
+++ b/src/tests/slave_recovery_tests.cpp
@@ -763,7 +763,13 @@ TYPED_TEST(SlaveRecoveryTest, ReconnectExecutor)
 
   TaskInfo task = createTask(offers.get()[0], "sleep 1000");
 
-  // Drop the first update from the executor.
+  // Drop the status updates from the executor.
+  // We actually wait until we can drop the TASK_RUNNING update here
+  // because the window between the two is small enough that we could
+  // still successfully receive TASK_RUNNING after we drop TASK_STARTING.
+  Future<StatusUpdateMessage> runningUpdate =
+    DROP_PROTOBUF(StatusUpdateMessage(), _, _);
+
   Future<StatusUpdateMessage> startingUpdate =
     DROP_PROTOBUF(StatusUpdateMessage(), _, _);
 
@@ -771,6 +777,7 @@ TYPED_TEST(SlaveRecoveryTest, ReconnectExecutor)
 
   // Stop the slave before the status update is received.
   AWAIT_READY(startingUpdate);
+  AWAIT_READY(runningUpdate);
 
   slave.get()->terminate();