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/10/12 03:11:24 UTC
mesos git commit: Fixed flaky ROOT_DynamicAddDelofCniConfig test.
Repository: mesos
Updated Branches:
refs/heads/master a4eed9235 -> e4f982155
Fixed flaky ROOT_DynamicAddDelofCniConfig test.
Due to clock manipulation, a TASK_RUNNING status update could have
been resent by the status update manager, triggering an expectation
failure.
Review: https://reviews.apache.org/r/62913
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/e4f98215
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/e4f98215
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/e4f98215
Branch: refs/heads/master
Commit: e4f982155deccbaaf42e881c1fdfc6d92fca5600
Parents: a4eed92
Author: Alexander Rukletsov <al...@apache.org>
Authored: Wed Oct 11 15:14:24 2017 -0700
Committer: Alexander Rukletsov <al...@apache.org>
Committed: Wed Oct 11 20:10:50 2017 -0700
----------------------------------------------------------------------
src/tests/containerizer/cni_isolator_tests.cpp | 8 ++++++++
1 file changed, 8 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/e4f98215/src/tests/containerizer/cni_isolator_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/containerizer/cni_isolator_tests.cpp b/src/tests/containerizer/cni_isolator_tests.cpp
index 636695f..e673d91 100644
--- a/src/tests/containerizer/cni_isolator_tests.cpp
+++ b/src/tests/containerizer/cni_isolator_tests.cpp
@@ -857,12 +857,20 @@ TEST_F(CniIsolatorTest, ROOT_DynamicAddDelofCniConfig)
EXPECT_CALL(sched, statusUpdate(&driver, _))
.WillOnce(FutureArg<1>(&statusRunning));
+ Future<Nothing> ack =
+ FUTURE_DISPATCH(_, &Slave::_statusUpdateAcknowledgement);
+
driver.launchTasks(offer2.id(), {task}, filters);
AWAIT_READY_FOR(statusRunning, Seconds(60));
EXPECT_EQ(task.task_id(), statusRunning->task_id());
EXPECT_EQ(TASK_RUNNING, statusRunning->state());
+ // To avoid having the agent resending the `TASK_RUNNING` update, which can
+ // happen due to clock manipulation below, wait for the status update
+ // acknowledgement to reach the agent.
+ AWAIT_READY(ack);
+
// Testing dynamic deletion of CNI networks.
rm = os::rm(path::join(cniConfigDir, "mockConfig"));
ASSERT_SOME(rm);