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/11/07 17:31:48 UTC

[mesos] branch 1.6.x updated: Fixed flaky `CgroupsIsolatorTest.ROOT_CGROUPS_CreateRecursively` test.

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

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


The following commit(s) were added to refs/heads/1.6.x by this push:
     new a77ab03  Fixed flaky `CgroupsIsolatorTest.ROOT_CGROUPS_CreateRecursively` test.
a77ab03 is described below

commit a77ab034f9b73783e0a82371c6c3892ff80a1dd5
Author: Andrei Budnik <ab...@mesosphere.com>
AuthorDate: Wed Oct 31 11:37:18 2018 -0700

    Fixed flaky `CgroupsIsolatorTest.ROOT_CGROUPS_CreateRecursively` test.
    
    This patch postpones removing of `cgroups_root` until agent's recovery
    is complete. Otherwise, the agent might fail to start.
    
    Review: https://reviews.apache.org/r/69218/
    (cherry picked from commit 3628e0b1ab2681d70f99d379754b5c10d332d70e)
---
 src/tests/containerizer/cgroups_isolator_tests.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/tests/containerizer/cgroups_isolator_tests.cpp b/src/tests/containerizer/cgroups_isolator_tests.cpp
index 68846ec..914d696 100644
--- a/src/tests/containerizer/cgroups_isolator_tests.cpp
+++ b/src/tests/containerizer/cgroups_isolator_tests.cpp
@@ -697,13 +697,17 @@ TEST_F(CgroupsIsolatorTest, ROOT_CGROUPS_CreateRecursively)
 
   Owned<MasterDetector> detector = master.get()->createDetector();
 
+  Future<Nothing> __recover = FUTURE_DISPATCH(_, &Slave::__recover);
+
   Try<Owned<cluster::Slave>> slave = StartSlave(
       detector.get(),
       containerizer.get(),
       flags);
-
   ASSERT_SOME(slave);
 
+  // Wait until agent recovery is complete.
+  AWAIT_READY(__recover);
+
   Result<string> hierarchy = cgroups::hierarchy("memory");
   ASSERT_SOME(hierarchy);