You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by jo...@apache.org on 2015/12/10 19:38:34 UTC

[2/2] mesos git commit: Cleaned up DRF allocator tests.

Cleaned up DRF allocator tests.

Review: https://reviews.apache.org/r/41216


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/559cd7f1
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/559cd7f1
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/559cd7f1

Branch: refs/heads/master
Commit: 559cd7f19272d1c60399442d12bc1c197e37ec46
Parents: c530829
Author: Neil Conway <ne...@gmail.com>
Authored: Thu Dec 10 10:13:57 2015 -0800
Committer: Joris Van Remoortere <jo...@gmail.com>
Committed: Thu Dec 10 10:38:19 2015 -0800

----------------------------------------------------------------------
 src/tests/hierarchical_allocator_tests.cpp | 28 +++++++++++--------------
 1 file changed, 12 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/559cd7f1/src/tests/hierarchical_allocator_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/hierarchical_allocator_tests.cpp b/src/tests/hierarchical_allocator_tests.cpp
index d4d8beb..e664866 100644
--- a/src/tests/hierarchical_allocator_tests.cpp
+++ b/src/tests/hierarchical_allocator_tests.cpp
@@ -16,7 +16,6 @@
 
 #include <atomic>
 #include <iostream>
-#include <queue>
 #include <string>
 #include <utility>
 #include <vector>
@@ -28,7 +27,6 @@
 #include <process/clock.hpp>
 #include <process/future.hpp>
 #include <process/gtest.hpp>
-#include <process/shared.hpp>
 #include <process/queue.hpp>
 
 #include <stout/duration.hpp>
@@ -59,12 +57,10 @@ using mesos::quota::QuotaInfo;
 
 using process::Clock;
 using process::Future;
-using process::Shared;
 
 using std::atomic;
 using std::cout;
 using std::endl;
-using std::queue;
 using std::string;
 using std::vector;
 
@@ -1168,8 +1164,8 @@ TEST_F(HierarchicalAllocatorTest, QuotaProvidesQuarantee)
   // would slow down the test.
   Clock::pause();
 
-  const std::string QUOTA_ROLE{"quota-role"};
-  const std::string NO_QUOTA_ROLE{"no-quota-role"};
+  const string QUOTA_ROLE{"quota-role"};
+  const string NO_QUOTA_ROLE{"no-quota-role"};
 
   hashmap<FrameworkID, Resources> EMPTY;
 
@@ -1287,8 +1283,8 @@ TEST_F(HierarchicalAllocatorTest, RemoveQuota)
   // would slow down the test.
   Clock::pause();
 
-  const std::string QUOTA_ROLE{"quota-role"};
-  const std::string NO_QUOTA_ROLE{"no-quota-role"};
+  const string QUOTA_ROLE{"quota-role"};
+  const string NO_QUOTA_ROLE{"no-quota-role"};
 
   initialize(vector<string>{QUOTA_ROLE, NO_QUOTA_ROLE});
 
@@ -1382,8 +1378,8 @@ TEST_F(HierarchicalAllocatorTest, MultipleFrameworksInRoleWithQuota)
   // would slow down the test.
   Clock::pause();
 
-  const std::string QUOTA_ROLE{"quota-role"};
-  const std::string NO_QUOTA_ROLE{"no-quota-role"};
+  const string QUOTA_ROLE{"quota-role"};
+  const string NO_QUOTA_ROLE{"no-quota-role"};
 
   hashmap<FrameworkID, Resources> EMPTY;
 
@@ -1502,8 +1498,8 @@ TEST_F(HierarchicalAllocatorTest, QuotaAllocationGranularity)
   // would slow down the test.
   Clock::pause();
 
-  const std::string QUOTA_ROLE{"quota-role"};
-  const std::string NO_QUOTA_ROLE{"no-quota-role"};
+  const string QUOTA_ROLE{"quota-role"};
+  const string NO_QUOTA_ROLE{"no-quota-role"};
 
   hashmap<FrameworkID, Resources> EMPTY;
 
@@ -1556,8 +1552,8 @@ TEST_F(HierarchicalAllocatorTest, DRFWithQuota)
   // would slow down the test.
   Clock::pause();
 
-  const std::string QUOTA_ROLE{"quota-role"};
-  const std::string NO_QUOTA_ROLE{"no-quota-role"};
+  const string QUOTA_ROLE{"quota-role"};
+  const string NO_QUOTA_ROLE{"no-quota-role"};
 
   initialize(vector<string>{QUOTA_ROLE, NO_QUOTA_ROLE});
 
@@ -1655,8 +1651,8 @@ TEST_F(HierarchicalAllocatorTest, QuotaAgainstStarvation)
   // would slow down the test.
   Clock::pause();
 
-  const std::string QUOTA_ROLE{"quota-role"};
-  const std::string NO_QUOTA_ROLE{"no-quota-role"};
+  const string QUOTA_ROLE{"quota-role"};
+  const string NO_QUOTA_ROLE{"no-quota-role"};
 
   initialize(vector<string>{QUOTA_ROLE, NO_QUOTA_ROLE});