You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by qi...@apache.org on 2019/01/13 13:27:21 UTC
[mesos] branch master updated: Waited for status update ACKs in the
test `RebootWithExecutorPidReused`.
This is an automated email from the ASF dual-hosted git repository.
qianzhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git
The following commit(s) were added to refs/heads/master by this push:
new 4fe464c Waited for status update ACKs in the test `RebootWithExecutorPidReused`.
4fe464c is described below
commit 4fe464cf882b28165897f6c2882e1f1bf2fb5459
Author: Qian Zhang <zh...@gmail.com>
AuthorDate: Sat Jan 12 16:46:33 2019 +0800
Waited for status update ACKs in the test `RebootWithExecutorPidReused`.
---
src/tests/slave_recovery_tests.cpp | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/src/tests/slave_recovery_tests.cpp b/src/tests/slave_recovery_tests.cpp
index 8eb5081..11666f1 100644
--- a/src/tests/slave_recovery_tests.cpp
+++ b/src/tests/slave_recovery_tests.cpp
@@ -2870,6 +2870,12 @@ TYPED_TEST(SlaveRecoveryTest, RebootWithExecutorPidReused)
.WillOnce(FutureArg<1>(&failedStatus))
.WillRepeatedly(Return()); // Ignore subsequent updates.
+ Future<Nothing> startingAck =
+ FUTURE_DISPATCH(_, &Slave::_statusUpdateAcknowledgement);
+
+ Future<Nothing> runningAck =
+ FUTURE_DISPATCH(_, &Slave::_statusUpdateAcknowledgement);
+
driver.launchTasks(offers.get()[0].id(), {task});
// Capture the executor ID and PID.
@@ -2880,13 +2886,19 @@ TYPED_TEST(SlaveRecoveryTest, RebootWithExecutorPidReused)
ExecutorID executorId = registerExecutor.executor_id();
UPID executorPid = registerExecutorMessage->from;
- // Wait for TASK_STARTING and TASK_RUNNING updates.
+ // Wait for TASK_STARTING and TASK_RUNNING updates and their ACKs
+ // to make sure the next sent status update is not a repeat of the
+ // unacknowledged TASK_RUNNING.
AWAIT_READY(startingStatus);
EXPECT_EQ(TASK_STARTING, startingStatus->state());
+ AWAIT_READY(startingAck);
+
AWAIT_READY(runningStatus);
EXPECT_EQ(TASK_RUNNING, runningStatus->state());
+ AWAIT_READY(runningAck);
+
// Capture the container ID.
Future<hashset<ContainerID>> containers = containerizer->containers();