You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ji...@apache.org on 2016/10/13 05:34:43 UTC
[5/7] mesos git commit: Updated 'MountInfoTableReadSorted' test to
use a hashset.
Updated 'MountInfoTableReadSorted' test to use a hashset.
Review: https://reviews.apache.org/r/52811/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/de69a72d
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/de69a72d
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/de69a72d
Branch: refs/heads/master
Commit: de69a72d1b52d8d2dbed215172bda885a4ff5a9e
Parents: 2f005a0
Author: Kevin Klues <kl...@gmail.com>
Authored: Wed Oct 12 22:34:17 2016 -0700
Committer: Jie Yu <yu...@gmail.com>
Committed: Wed Oct 12 22:34:17 2016 -0700
----------------------------------------------------------------------
src/tests/containerizer/fs_tests.cpp | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/de69a72d/src/tests/containerizer/fs_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/containerizer/fs_tests.cpp b/src/tests/containerizer/fs_tests.cpp
index d8bd1d0..ccdd596 100644
--- a/src/tests/containerizer/fs_tests.cpp
+++ b/src/tests/containerizer/fs_tests.cpp
@@ -18,8 +18,6 @@
#include <gmock/gmock.h>
-#include <set>
-
#include <stout/foreach.hpp>
#include <stout/gtest.hpp>
#include <stout/hashset.hpp>
@@ -170,15 +168,15 @@ TEST_F(FsTest, MountInfoTableReadSorted)
Try<MountInfoTable> table = MountInfoTable::read();
ASSERT_SOME(table);
- set<int> ids;
+ hashset<int> ids;
// Verify that all parent entries appear *before* their children.
foreach (const MountInfoTable::Entry& entry, table->entries) {
if (entry.target != "/") {
- ASSERT_TRUE(ids.count(entry.parent) == 1);
+ ASSERT_TRUE(ids.contains(entry.parent));
}
- ASSERT_TRUE(ids.count(entry.id) == 0);
+ ASSERT_FALSE(ids.contains(entry.id));
ids.insert(entry.id);
}