mesos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vinod Kone" <vinodk...@gmail.com>
Subject Re: Review Request 30432: Fixed the flaky MasterAuthorizationTest.FrameworkRemovedBeforeReregistration test.
Date Fri, 30 Jan 2015 00:51:55 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/30432/#review70299
-----------------------------------------------------------

Ship it!



src/tests/master_authorization_tests.cpp
<https://reviews.apache.org/r/30432/#comment115388>

    Maybe just say the same thing that was said in the earlier test (#910) for consistency?
    
    // Pause the clock to avoid scheduler registration retries.


- Vinod Kone


On Jan. 29, 2015, 11:13 p.m., Ben Mahler wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30432/
> -----------------------------------------------------------
> 
> (Updated Jan. 29, 2015, 11:13 p.m.)
> 
> 
> Review request for mesos and Vinod Kone.
> 
> 
> Bugs: MESOS-2306
>     https://issues.apache.org/jira/browse/MESOS-2306
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> From MESOS-2306:
> 
> There is a race here where the scheduler retries registration an extra time in the failing
test. This then messes up the mock expectations:
> 
> ```
>   // Return a pending future from authorizer after first attempt.
>   Future<Nothing> authorize2;
>   Promise<bool> promise2;
>   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.
> ```
> 
> We want to simulate a master detection and capture the authorization, but when there
is a spurious retry, our simulated retry falls into the WillRepeatedly case and is authorized
immediately.
> 
> 
> Diffs
> -----
> 
>   src/tests/master_authorization_tests.cpp 42ffe24685b859fb16132d22a932f6637fe9b5c3 
> 
> Diff: https://reviews.apache.org/r/30432/diff/
> 
> 
> Testing
> -------
> 
> 500 iterations of this test
> 
> 
> Thanks,
> 
> Ben Mahler
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message