Repository: mesos Updated Branches: refs/heads/master 380ec46f8 -> b8da3f67d
Set allocation level explicitly instead of implicitly in v1 api tests. As discussed with Neil, we are setting low allocation level for ReserveResources and UnreserveResources operator api v1 tests explicitly instead of implicitly as it was set in r50072. We are doing this to improve clarity in test cases. Review: https://reviews.apache.org/r/50528/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/b8da3f67 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/b8da3f67 Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/b8da3f67 Branch: refs/heads/master Commit: b8da3f67df60a67290b1f9545e261733692468e1 Parents: 380ec46 Author: Abhishek Dasgupta <a10gu...@linux.vnet.ibm.com> Authored: Wed Jul 27 16:55:08 2016 -0700 Committer: Vinod Kone <vinodk...@gmail.com> Committed: Wed Jul 27 16:55:08 2016 -0700 ---------------------------------------------------------------------- src/tests/api_tests.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/b8da3f67/src/tests/api_tests.cpp ---------------------------------------------------------------------- diff --git a/src/tests/api_tests.cpp b/src/tests/api_tests.cpp index 88523fd..abf102f 100644 --- a/src/tests/api_tests.cpp +++ b/src/tests/api_tests.cpp @@ -92,14 +92,6 @@ class MasterAPITest public WithParamInterface<ContentType> { public: - virtual master::Flags CreateMasterFlags() - { - // Set a low allocation interval to speed up tests. - master::Flags flags = MesosTest::CreateMasterFlags(); - flags.allocation_interval = Milliseconds(50); - return flags; - } - // Helper function to post a request to "/api/v1" master endpoint and return // the response. Future<v1::master::Response> post( @@ -937,7 +929,11 @@ TEST_P(MasterAPITest, ReserveResources) EXPECT_CALL(allocator, initialize(_, _, _, _, _)); - Try<Owned<cluster::Master>> master = StartMaster(&allocator); + // Set a low allocation interval to speed up this test. + master::Flags flags = MesosTest::CreateMasterFlags(); + flags.allocation_interval = Milliseconds(50); + + Try<Owned<cluster::Master>> master = StartMaster(&allocator, flags); ASSERT_SOME(master); Future<SlaveID> slaveId; @@ -1027,7 +1023,11 @@ TEST_P(MasterAPITest, UnreserveResources) EXPECT_CALL(allocator, initialize(_, _, _, _, _)); - Try<Owned<cluster::Master>> master = StartMaster(&allocator); + // Set a low allocation interval to speed up this test. + master::Flags flags = MesosTest::CreateMasterFlags(); + flags.allocation_interval = Milliseconds(50); + + Try<Owned<cluster::Master>> master = StartMaster(&allocator, flags); ASSERT_SOME(master); Future<SlaveID> slaveId;