You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by zh...@apache.org on 2018/05/11 18:57:42 UTC

mesos git commit: Removed unnecessary expectation on termination.

Repository: mesos
Updated Branches:
  refs/heads/master 93b9448ac -> d0de83382


Removed unnecessary expectation on termination.

This test was flaky because termination could already happened when we
set up the expectation. Given that we already verified task state, I do
not see checking container termination explicitly is necessary, so
removing the expectation should fix the flakiness.

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


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

Branch: refs/heads/master
Commit: d0de83382fe64ded8e0b71440c6726381efed8fe
Parents: 93b9448
Author: Zhitao Li <zh...@gmail.com>
Authored: Mon May 7 14:44:49 2018 -0700
Committer: Zhitao Li <zh...@gmail.com>
Committed: Fri May 11 11:57:11 2018 -0700

----------------------------------------------------------------------
 src/tests/containerizer/docker_containerizer_tests.cpp | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/d0de8338/src/tests/containerizer/docker_containerizer_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/containerizer/docker_containerizer_tests.cpp b/src/tests/containerizer/docker_containerizer_tests.cpp
index d834e53..e37a9c1 100644
--- a/src/tests/containerizer/docker_containerizer_tests.cpp
+++ b/src/tests/containerizer/docker_containerizer_tests.cpp
@@ -642,12 +642,10 @@ TEST_F(DockerContainerizerTest, ROOT_DOCKER_MaxCompletionTime)
     .WillOnce(FutureArg<1>(&statusRunning))
     .WillOnce(FutureArg<1>(&statusFailed));
 
-  driver.launchTasks(offers.get()[0].id(), {task});
-
-  AWAIT_READY_FOR(containerId, Seconds(60));
+  Future<Nothing> executorTerminated =
+    FUTURE_DISPATCH(_, &Slave::executorTerminated);
 
-  Future<Option<ContainerTermination>> termination =
-dockerContainerizer.wait(containerId.get());
+  driver.launchTasks(offers.get()[0].id(), {task});
 
   AWAIT_READY_FOR(statusStarting, Seconds(60));
   EXPECT_EQ(TASK_STARTING, statusStarting->state());
@@ -659,8 +657,7 @@ dockerContainerizer.wait(containerId.get());
   EXPECT_EQ(
       TaskStatus::REASON_MAX_COMPLETION_TIME_REACHED, statusFailed->reason());
 
-  AWAIT_READY(termination);
-  EXPECT_SOME(termination.get());
+  AWAIT_READY(executorTerminated);
 
   driver.stop();
   driver.join();