> On Oct. 2, 2013, 12:52 a.m., Vinod Kone wrote:
> > src/tests/allocator_tests.cpp, line 1237
> > <https://reviews.apache.org/r/14431/diff/1/?file=359991#file359991line1237>
> >
> >     Can you actually test that the sum of the resources in these 2 calls is 
> > equal to the sum of task and executor resources?
> >     
> >     Future<Nothing> resourceOffers1;
> >     Future<Nothing> resourceOffers2;
> >       
> >     EXPECT_CALL(sched, resourceOffers(_,_)
> >      .WillOnce(FutureSatisfy(&resourceOffers1)
> >      .WillOnce(FutureSatisfy(&resourceOffers2));
> >     
> >     AWAIT_READY(resourceOffers1);
> >     AWAIT_READY(resourceOffers2);
> >     
> >     ASSERT_EQ(resourceOffers1.get() + resourceOffers2.get(), expected)
> >

Note that this test does not expect the resources to be re-offered, rather 
these two resourcesRecovered calls occur for correct accounting upon slave 
removal. That being said, I've updated the expectations to ensure that the 2nd 
slave's resources are offered exclusively.


- Ben


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


On Oct. 2, 2013, 12:19 a.m., Ben Mahler wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/14431/
> -----------------------------------------------------------
> 
> (Updated Oct. 2, 2013, 12:19 a.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Thomas Marshall, and Vinod Kone.
> 
> 
> Bugs: MESOS-621
>     https://issues.apache.org/jira/browse/MESOS-621
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> I noticed this bug described in Thomas' comment in MESOS-621, so I figured I 
> would fix it along the way to MESOS-711.
> 
> The recovery of executor resources upon slave removal was missing.
> 
> 
> Diffs
> -----
> 
>   src/master/master.cpp a49b17ef43fca5b385a89731ca8776a26b61399a 
>   src/tests/allocator_tests.cpp c57da6eb3c431b47468b6a6941c3de06af9209e5 
> 
> Diff: https://reviews.apache.org/r/14431/diff/
> 
> 
> Testing
> -------
> 
> make check and updated a test to reflect the change
> 
> 
> Thanks,
> 
> Ben Mahler
> 
>

Reply via email to