Fixed some style issues in posix rlimits isolator tests.
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/cbb2262d Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/cbb2262d Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/cbb2262d Branch: refs/heads/master Commit: cbb2262dbe45f9303281518e58baf907db6ee4af Parents: 21a3405 Author: Jie Yu <[email protected]> Authored: Fri Aug 4 15:46:29 2017 -0700 Committer: Jie Yu <[email protected]> Committed: Fri Aug 4 15:46:29 2017 -0700 ---------------------------------------------------------------------- .../posix_rlimits_isolator_tests.cpp | 35 ++++++++++---------- 1 file changed, 18 insertions(+), 17 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/cbb2262d/src/tests/containerizer/posix_rlimits_isolator_tests.cpp ---------------------------------------------------------------------- diff --git a/src/tests/containerizer/posix_rlimits_isolator_tests.cpp b/src/tests/containerizer/posix_rlimits_isolator_tests.cpp index 3d87a78..bf25049 100644 --- a/src/tests/containerizer/posix_rlimits_isolator_tests.cpp +++ b/src/tests/containerizer/posix_rlimits_isolator_tests.cpp @@ -79,8 +79,8 @@ TEST_F(PosixRLimitsIsolatorTest, InvalidLimits) Future<vector<Offer>> offers; EXPECT_CALL(sched, resourceOffers(_, _)) - .WillOnce(FutureArg<1>(&offers)) - .WillRepeatedly(Return()); // Ignore subsequent offers. + .WillOnce(FutureArg<1>(&offers)) + .WillRepeatedly(Return()); // Ignore subsequent offers. driver.start(); @@ -106,7 +106,7 @@ TEST_F(PosixRLimitsIsolatorTest, InvalidLimits) Future<TaskStatus> taskStatus; EXPECT_CALL(sched, statusUpdate(&driver, _)) - .WillOnce(FutureArg<1>(&taskStatus)); + .WillOnce(FutureArg<1>(&taskStatus)); driver.launchTasks(offers.get()[0].id(), {task}); @@ -122,7 +122,8 @@ TEST_F(PosixRLimitsIsolatorTest, InvalidLimits) // This test confirms that setting no values for the soft and hard // limits implies an unlimited resource. -TEST_F(PosixRLimitsIsolatorTest, UnsetLimits) { +TEST_F(PosixRLimitsIsolatorTest, UnsetLimits) +{ Try<Owned<cluster::Master>> master = StartMaster(); ASSERT_SOME(master); @@ -147,8 +148,8 @@ TEST_F(PosixRLimitsIsolatorTest, UnsetLimits) { Future<vector<Offer>> offers; EXPECT_CALL(sched, resourceOffers(_, _)) - .WillOnce(FutureArg<1>(&offers)) - .WillRepeatedly(Return()); // Ignore subsequent offers. + .WillOnce(FutureArg<1>(&offers)) + .WillRepeatedly(Return()); // Ignore subsequent offers. driver.start(); @@ -181,8 +182,8 @@ TEST_F(PosixRLimitsIsolatorTest, UnsetLimits) { Future<TaskStatus> statusRunning; Future<TaskStatus> statusFinal; EXPECT_CALL(sched, statusUpdate(&driver, _)) - .WillOnce(FutureArg<1>(&statusRunning)) - .WillOnce(FutureArg<1>(&statusFinal)); + .WillOnce(FutureArg<1>(&statusRunning)) + .WillOnce(FutureArg<1>(&statusFinal)); driver.launchTasks(offers.get()[0].id(), {task}); @@ -227,8 +228,8 @@ TEST_F(PosixRLimitsIsolatorTest, BothSoftAndHardLimitSet) Future<vector<Offer>> offers; EXPECT_CALL(sched, resourceOffers(_, _)) - .WillOnce(FutureArg<1>(&offers)) - .WillRepeatedly(Return()); // Ignore subsequent offers. + .WillOnce(FutureArg<1>(&offers)) + .WillRepeatedly(Return()); // Ignore subsequent offers. driver.start(); @@ -252,7 +253,7 @@ TEST_F(PosixRLimitsIsolatorTest, BothSoftAndHardLimitSet) Future<TaskStatus> status; EXPECT_CALL(sched, statusUpdate(&driver, _)) - .WillOnce(FutureArg<1>(&status)); + .WillOnce(FutureArg<1>(&status)); driver.launchTasks(offers.get()[0].id(), {task}); @@ -294,8 +295,8 @@ TEST_F(PosixRLimitsIsolatorTest, TaskExceedingLimit) Future<vector<Offer>> offers; EXPECT_CALL(sched, resourceOffers(_, _)) - .WillOnce(FutureArg<1>(&offers)) - .WillRepeatedly(Return()); // Ignore subsequent offers. + .WillOnce(FutureArg<1>(&offers)) + .WillRepeatedly(Return()); // Ignore subsequent offers. driver.start(); @@ -377,8 +378,8 @@ TEST_F(PosixRLimitsIsolatorTest, NestedContainers) Future<vector<Offer>> offers; EXPECT_CALL(sched, resourceOffers(_, _)) - .WillOnce(FutureArg<1>(&offers)) - .WillRepeatedly(Return()); // Ignore subsequent offers. + .WillOnce(FutureArg<1>(&offers)) + .WillRepeatedly(Return()); // Ignore subsequent offers. driver.start(); @@ -395,11 +396,11 @@ TEST_F(PosixRLimitsIsolatorTest, NestedContainers) foreach (Future<TaskStatus>& taskStatus, taskStatuses) { EXPECT_CALL(sched, statusUpdate(&driver, _)) - .WillOnce(FutureArg<1>(&taskStatus)); + .WillOnce(FutureArg<1>(&taskStatus)); } EXPECT_CALL(sched, statusUpdate(&driver, _)) - .WillRepeatedly(Return()); // Ignore subsequent updates. + .WillRepeatedly(Return()); // Ignore subsequent updates. } Resources resources = Resources::parse("cpus:0.1;mem:32;disk:32").get();
