Repository: mesos
Updated Branches:
  refs/heads/master dc7c4b6d0 -> c9ba83e27


Fixed the flaky MasterAuthorizationTest.FrameworkRemovedBeforeReregistration 
test.

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


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

Branch: refs/heads/master
Commit: 57e37575604b9e5b7151828e2047398ccef951d7
Parents: 9938923
Author: Benjamin Mahler <[email protected]>
Authored: Thu Jan 29 15:08:26 2015 -0800
Committer: Benjamin Mahler <[email protected]>
Committed: Thu Jan 29 17:19:44 2015 -0800

----------------------------------------------------------------------
 src/tests/master_authorization_tests.cpp | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/57e37575/src/tests/master_authorization_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/master_authorization_tests.cpp 
b/src/tests/master_authorization_tests.cpp
index 42ffe24..20adaa9 100644
--- a/src/tests/master_authorization_tests.cpp
+++ b/src/tests/master_authorization_tests.cpp
@@ -966,8 +966,10 @@ TEST_F(MasterAuthorizationTest, 
FrameworkRemovedBeforeReregistration)
   EXPECT_CALL(authorizer, authorize(An<const 
mesos::ACL::RegisterFramework&>()))
     .WillOnce(Return(true))
     .WillOnce(DoAll(FutureSatisfy(&authorize2),
-                    Return(promise2.future())))
-    .WillRepeatedly(Return(true)); // Authorize subsequent registration 
retries.
+                    Return(promise2.future())));
+
+  // Pause the clock to avoid scheduler registration retries.
+  Clock::pause();
 
   driver.start();
 
@@ -1003,7 +1005,6 @@ TEST_F(MasterAuthorizationTest, 
FrameworkRemovedBeforeReregistration)
   // because the framework PID was removed from 'authenticated' map.
   // Settle the clock here to ensure 'Master::_reregisterFramework()'
   // is executed.
-  Clock::pause();
   Clock::settle();
 
   Shutdown();

Reply via email to