You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by jp...@apache.org on 2018/07/16 21:38:38 UTC
mesos git commit: Factored out ROOT_XFS_TestBase::getSandboxes().
Repository: mesos
Updated Branches:
refs/heads/master 1467120b1 -> d0c7d8993
Factored out ROOT_XFS_TestBase::getSandboxes().
Review: https://reviews.apache.org/r/67915/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/d0c7d899
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/d0c7d899
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/d0c7d899
Branch: refs/heads/master
Commit: d0c7d899382028762cf49843eb75e2576feeda0e
Parents: 1467120
Author: Ilya Pronin <ip...@twopensource.com>
Authored: Mon Jul 16 12:42:57 2018 -0700
Committer: James Peach <jp...@apache.org>
Committed: Mon Jul 16 14:38:25 2018 -0700
----------------------------------------------------------------------
src/tests/containerizer/xfs_quota_tests.cpp | 36 +++++++++++-------------
1 file changed, 16 insertions(+), 20 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/d0c7d899/src/tests/containerizer/xfs_quota_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/containerizer/xfs_quota_tests.cpp b/src/tests/containerizer/xfs_quota_tests.cpp
index bee0c2d..dc18a8a 100644
--- a/src/tests/containerizer/xfs_quota_tests.cpp
+++ b/src/tests/containerizer/xfs_quota_tests.cpp
@@ -53,6 +53,7 @@ using namespace mesos::internal::xfs;
using namespace process;
+using std::list;
using std::string;
using std::vector;
@@ -223,6 +224,19 @@ public:
return string("/dev/loop") + stringify(devno);
}
+ Try<list<string>> getSandboxes()
+ {
+ return os::glob(path::join(
+ slave::paths::getSandboxRootDir(mountPoint.get()),
+ "*",
+ "frameworks",
+ "*",
+ "executors",
+ "*",
+ "runs",
+ "*"));
+ }
+
Option<string> mountOptions;
Option<string> mkfsOptions;
Option<string> loopDevice; // The loop device we attached.
@@ -943,16 +957,7 @@ TEST_F(ROOT_XFS_QuotaTest, NoCheckpointRecovery)
// We should have no executors left because we didn't checkpoint.
ASSERT_TRUE(usage2->executors().empty());
- Try<std::list<string>> sandboxes = os::glob(path::join(
- slave::paths::getSandboxRootDir(mountPoint.get()),
- "*",
- "frameworks",
- "*",
- "executors",
- "*",
- "runs",
- "*"));
-
+ Try<std::list<string>> sandboxes = getSandboxes();
ASSERT_SOME(sandboxes);
// One sandbox and one symlink.
@@ -1055,16 +1060,7 @@ TEST_F(ROOT_XFS_QuotaTest, CheckpointRecovery)
// We should have still have 1 executor using resources.
ASSERT_EQ(1, usage1->executors().size());
- Try<std::list<string>> sandboxes = os::glob(path::join(
- slave::paths::getSandboxRootDir(mountPoint.get()),
- "*",
- "frameworks",
- "*",
- "executors",
- "*",
- "runs",
- "*"));
-
+ Try<std::list<string>> sandboxes = getSandboxes();
ASSERT_SOME(sandboxes);
// One sandbox and one symlink.