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/10/10 23:56:31 UTC

[mesos] branch 1.4.x updated: Fixed the default executor flaky testes in tests/cluster.cpp.

This is an automated email from the ASF dual-hosted git repository.

gilbert pushed a commit to branch 1.4.x
in repository https://gitbox.apache.org/repos/asf/mesos.git


The following commit(s) were added to refs/heads/1.4.x by this push:
     new df0a475  Fixed the default executor flaky testes in tests/cluster.cpp.
df0a475 is described below

commit df0a47570e8068861c113048c74d82a0370d12fd
Author: Gilbert Song <so...@gmail.com>
AuthorDate: Thu Jan 11 18:05:54 2018 -0800

    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
    (cherry picked from commit 364e78af7598289f6724c2ee037e0cb1de377902)
---
 src/tests/cluster.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/tests/cluster.cpp b/src/tests/cluster.cpp
index a5e2037..0a1e4f8 100644
--- a/src/tests/cluster.cpp
+++ b/src/tests/cluster.cpp
@@ -569,8 +569,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);
     }