You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by id...@apache.org on 2014/06/21 01:55:53 UTC
[2/2] git commit: Cleaned up test to use
cgroups::memory::limit_in_bytes
Cleaned up test to use cgroups::memory::limit_in_bytes
Review: https://reviews.apache.org/r/20138
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/ce09d171
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/ce09d171
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/ce09d171
Branch: refs/heads/master
Commit: ce09d171f6b40218b7ca72a220424fed10db39ff
Parents: 326aa49
Author: Ian Downes <id...@twitter.com>
Authored: Tue Apr 8 15:06:59 2014 -0700
Committer: Ian Downes <id...@twitter.com>
Committed: Fri Jun 20 16:54:52 2014 -0700
----------------------------------------------------------------------
src/tests/cgroups_tests.cpp | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/ce09d171/src/tests/cgroups_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/cgroups_tests.cpp b/src/tests/cgroups_tests.cpp
index 815a266..01cf498 100644
--- a/src/tests/cgroups_tests.cpp
+++ b/src/tests/cgroups_tests.cpp
@@ -516,12 +516,8 @@ TEST_F(CgroupsAnyHierarchyWithCpuMemoryTest, ROOT_CGROUPS_Listen)
hierarchy, TEST_CGROUPS_ROOT));
// Limit the memory usage of the test cgroup to 64MB.
- size_t limit = 1024 * 1024 * 64;
- ASSERT_SOME(cgroups::write(
- hierarchy,
- TEST_CGROUPS_ROOT,
- "memory.limit_in_bytes",
- stringify(limit)));
+ ASSERT_SOME(cgroups::memory::limit_in_bytes(
+ hierarchy, TEST_CGROUPS_ROOT, Megabytes(64)));
// Listen on oom events for test cgroup.
Future<Nothing> future =