Repository: mesos Updated Branches: refs/heads/master 645adc6ab -> 7095fc384
Fixed authorization tests to properly deal with registration retries. Review: https://reviews.apache.org/r/25516 Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/7095fc38 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/7095fc38 Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/7095fc38 Branch: refs/heads/master Commit: 7095fc3846030264e253cb7c93becde7de87d310 Parents: 645adc6 Author: Vinod Kone <[email protected]> Authored: Wed Sep 10 12:39:30 2014 -0700 Committer: Vinod Kone <[email protected]> Committed: Wed Sep 10 17:43:57 2014 -0700 ---------------------------------------------------------------------- src/tests/master_authorization_tests.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/7095fc38/src/tests/master_authorization_tests.cpp ---------------------------------------------------------------------- diff --git a/src/tests/master_authorization_tests.cpp b/src/tests/master_authorization_tests.cpp index 0804482..652e80d 100644 --- a/src/tests/master_authorization_tests.cpp +++ b/src/tests/master_authorization_tests.cpp @@ -766,7 +766,8 @@ TEST_F(MasterAuthorizationTest, DuplicateRegistration) .WillOnce(DoAll(FutureSatisfy(&authorize1), Return(promise1.future()))) .WillOnce(DoAll(FutureSatisfy(&authorize2), - Return(promise2.future()))); + Return(promise2.future()))) + .WillRepeatedly(Return(true)); // Authorize subsequent registration retries. driver.start(); @@ -833,7 +834,8 @@ TEST_F(MasterAuthorizationTest, DuplicateReregistration) .WillOnce(DoAll(FutureSatisfy(&authorize2), Return(promise2.future()))) .WillOnce(DoAll(FutureSatisfy(&authorize3), - Return(promise3.future()))); + Return(promise3.future()))) + .WillRepeatedly(Return(true)); // Authorize subsequent registration retries. driver.start(); @@ -898,7 +900,8 @@ TEST_F(MasterAuthorizationTest, FrameworkRemovedBeforeRegistration) Promise<bool> promise; EXPECT_CALL(authorizer, authorize(An<const mesos::ACL::RegisterFramework&>())) .WillOnce(DoAll(FutureSatisfy(&authorize), - Return(promise.future()))); + Return(promise.future()))) + .WillRepeatedly(Return(true)); // Authorize subsequent registration retries. driver.start(); @@ -957,7 +960,8 @@ TEST_F(MasterAuthorizationTest, FrameworkRemovedBeforeReregistration) EXPECT_CALL(authorizer, authorize(An<const mesos::ACL::RegisterFramework&>())) .WillOnce(Return(true)) .WillOnce(DoAll(FutureSatisfy(&authorize2), - Return(promise2.future()))); + Return(promise2.future()))) + .WillRepeatedly(Return(true)); // Authorize subsequent registration retries. driver.start();
