This is an automated email from the ASF dual-hosted git repository.
bbannier 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 04a1992 Added additional synchronization to a previously flaky test.
04a1992 is described below
commit 04a1992c289584481a1b0aa5b937bdc68c3d56fb
Author: Benjamin Bannier <[email protected]>
AuthorDate: Wed Jul 17 13:54:24 2019 +0200
Added additional synchronization to a previously flaky test.
This test did not make sure that the agent's task status update manager
had received a task status update acknowledgemtn before launching a
subsequent task. The agent then, given its state, correctly rejected the
task.
This patch adds additional synchronization so the agent has finished
processing the task status update like expected.
Review: https://reviews.apache.org/r/71092
---
src/tests/slave_tests.cpp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/tests/slave_tests.cpp b/src/tests/slave_tests.cpp
index 1ed59ca..abee107 100644
--- a/src/tests/slave_tests.cpp
+++ b/src/tests/slave_tests.cpp
@@ -12369,6 +12369,9 @@ TEST_F(SlaveTest, DrainingAgentRejectLaunch)
// Acknowledge the pending task status update. Once the acknowledgement has
// been processed the agent will leave its draining state and accept task
// launches again.
+ Future<Nothing> statusUpdateAcknowledgement =
+ FUTURE_DISPATCH(_, &Slave::_statusUpdateAcknowledgement);
+
{
v1::scheduler::Call call;
call.set_type(v1::scheduler::Call::ACKNOWLEDGE);
@@ -12382,6 +12385,8 @@ TEST_F(SlaveTest, DrainingAgentRejectLaunch)
mesos.send(call);
}
+ AWAIT_READY(statusUpdateAcknowledgement);
+
Future<v1::scheduler::Event::Offers> offers3;
EXPECT_CALL(*scheduler, offers(_, _))
.WillOnce(FutureArg<1>(&offers3))