You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ne...@apache.org on 2017/05/05 17:57:46 UTC
mesos git commit: Fixed flakiness in
HierarchicalAllocatorTest.NestedRoleQuota.
Repository: mesos
Updated Branches:
refs/heads/master 400d241e5 -> f68e450be
Fixed flakiness in HierarchicalAllocatorTest.NestedRoleQuota.
Review: https://reviews.apache.org/r/58974
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/f68e450b
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/f68e450b
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/f68e450b
Branch: refs/heads/master
Commit: f68e450bea7bcba2e66f2ac15133a90d38e20907
Parents: 400d241
Author: Neil Conway <ne...@gmail.com>
Authored: Wed May 3 13:45:10 2017 -0700
Committer: Neil Conway <ne...@gmail.com>
Committed: Fri May 5 10:55:02 2017 -0700
----------------------------------------------------------------------
src/tests/hierarchical_allocator_tests.cpp | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/f68e450b/src/tests/hierarchical_allocator_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/hierarchical_allocator_tests.cpp b/src/tests/hierarchical_allocator_tests.cpp
index ebc4868..33d5c0e 100644
--- a/src/tests/hierarchical_allocator_tests.cpp
+++ b/src/tests/hierarchical_allocator_tests.cpp
@@ -4481,15 +4481,16 @@ TEST_F(HierarchicalAllocatorTest, NestedRoleQuota)
Future<Allocation> allocation = allocations.get();
EXPECT_TRUE(allocation.isPending());
+ // Set quota for `CHILD_ROLE2`.
+ const Quota childQuota = createQuota(CHILD_ROLE2, "cpus:1;mem:512");
+ allocator->setQuota(CHILD_ROLE2, childQuota);
+
// Create `framework3` in CHILD_ROLE2, which is a child role of
// PARENT_ROLE. CHILD_ROLE2 has quota, so in the current
// implementation, it will be offered resources.
FrameworkInfo framework3 = createFrameworkInfo({CHILD_ROLE2});
allocator->addFramework(framework3.id(), framework3, {}, true);
- const Quota childQuota = createQuota(CHILD_ROLE2, "cpus:1;mem:512");
- allocator->setQuota(CHILD_ROLE2, childQuota);
-
{
Allocation expected = Allocation(
framework3.id(),