You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by gi...@apache.org on 2018/01/13 01:04:36 UTC

[3/4] mesos git commit: Fixed the default executor flaky testes in tests/cluster.cpp.

Fixed the default executor flaky testes in tests/cluster.cpp.

This patch fixes some flaky tests listed below:
1. DefaultExecutorTest.KillTask/0
2. DefaultExecutorTest.TaskWithFileURI/0
3. DefaultExecutorTest.ResourceLimitation/0
4. DefaultExecutorTest.KillMultipleTasks/0

The root cause is that either docker containerizer or mesos
containerizer have wait() and destroy() rely on the same
future `ContainerTermination` which means these two methods
become ready simultaneously, but this is not true for the
composing containerizer because wait() may finish before
destroy in which case the `containers_` hasshmap is not
cleaned up yet in destroy()'s `.onAny` callback.

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


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

Branch: refs/heads/1.5.x
Commit: 0f05e052ca3b8c573437c643f274b0cf5752c22e
Parents: dc6beb7
Author: Gilbert Song <so...@gmail.com>
Authored: Thu Jan 11 18:05:54 2018 -0800
Committer: Gilbert Song <so...@gmail.com>
Committed: Fri Jan 12 17:04:19 2018 -0800

----------------------------------------------------------------------
 src/tests/cluster.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/0f05e052/src/tests/cluster.cpp
----------------------------------------------------------------------
diff --git a/src/tests/cluster.cpp b/src/tests/cluster.cpp
index f964bf0..de4ddf4 100644
--- a/src/tests/cluster.cpp
+++ b/src/tests/cluster.cpp
@@ -631,8 +631,9 @@ Slave::~Slave()
       process::Future<Option<ContainerTermination>> wait =
         containerizer->wait(containerId);
 
-      containerizer->destroy(containerId);
+      process::Future<bool> destroy = containerizer->destroy(containerId);
 
+      AWAIT(destroy);
       AWAIT(wait);
     }