Repository: mesos Updated Branches: refs/heads/master 49cd532a7 -> a7de6513c
Replaced tabs with spaces and fixed line length. Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/a7de6513 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/a7de6513 Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/a7de6513 Branch: refs/heads/master Commit: a7de6513cd2ff431a541e93c01858a0330584015 Parents: 49cd532 Author: Benjamin Mahler <[email protected]> Authored: Mon Jul 20 12:23:40 2015 -0700 Committer: Benjamin Mahler <[email protected]> Committed: Mon Jul 20 12:23:40 2015 -0700 ---------------------------------------------------------------------- src/tests/mesos.cpp | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/a7de6513/src/tests/mesos.cpp ---------------------------------------------------------------------- diff --git a/src/tests/mesos.cpp b/src/tests/mesos.cpp index f45069c..f09ef0f 100644 --- a/src/tests/mesos.cpp +++ b/src/tests/mesos.cpp @@ -732,28 +732,28 @@ void ContainerizerTest<slave::MesosContainerizer>::SetUp() ->test_case_name() << ".*).\n" << "-------------------------------------------------------------"; } else { - // If the subsystem is already mounted in the hierarchy make - // sure that we don't have any existing cgroups that have - // persisted that match our TEST_CGROUPS_ROOT (because - // otherwise our tests will fail when we try and clean them up - // later). - Try<std::vector<string>> cgroups = cgroups::get(hierarchy); - CHECK_SOME(cgroups); - - foreach (const string& cgroup, cgroups.get()) { - // Remove any cgroups that start with TEST_CGROUPS_ROOT. - if (strings::startsWith(cgroup, TEST_CGROUPS_ROOT)) { - AWAIT_READY(cgroups::destroy(hierarchy, cgroup)) - << "-------------------------------------------------------------\n" + // If the subsystem is already mounted in the hierarchy make + // sure that we don't have any existing cgroups that have + // persisted that match our TEST_CGROUPS_ROOT (because + // otherwise our tests will fail when we try and clean them up + // later). + Try<std::vector<string>> cgroups = cgroups::get(hierarchy); + CHECK_SOME(cgroups); + + foreach (const string& cgroup, cgroups.get()) { + // Remove any cgroups that start with TEST_CGROUPS_ROOT. + if (strings::startsWith(cgroup, TEST_CGROUPS_ROOT)) { + AWAIT_READY(cgroups::destroy(hierarchy, cgroup)) + << "-----------------------------------------------------------\n" << "We're very sorry but we can't seem to destroy existing\n" << "cgroups that we likely created as part of an earlier\n" << "invocation of the tests. Please manually destroy the cgroup\n" - << "at '" << path::join(hierarchy, cgroup) << "' by first manually\n" - << "killing all the processes found in the file at '" + << "at '" << path::join(hierarchy, cgroup) << "' by first\n" + << "manually killing all the processes found in the file at '" << path::join(hierarchy, cgroup, "tasks") << "'\n" - << "-------------------------------------------------------------"; - } - } + << "-----------------------------------------------------------"; + } + } } } }
