> On Aug. 11, 2014, 10:56 p.m., Vinod Kone wrote:
> > src/tests/slave_tests.cpp, line 1097
> > <https://reviews.apache.org/r/22313/diff/24/?file=653349#file653349line1097>
> >
> >     I think you can get rid of 'runTask' future and just work with 
> > 'updateCall' future. Any reason to need both?

Thanks! Vinod!
Now I changed to

AWAIT_READY(update);
EXPECT_TRUE(status2.isPending());

Do you think

AWAIT_READY(update);
Clock::pause();
Clock::settle();
EXPECT_TRUE(status2.isPending());
Clock::resume();

will be better?


> On Aug. 11, 2014, 10:56 p.m., Vinod Kone wrote:
> > src/tests/slave_tests.cpp, line 1254
> > <https://reviews.apache.org/r/22313/diff/24/?file=653349#file653349line1254>
> >
> >     Why are you failing the promise here? Don't you want to set it to 
> > Nothing and then make sure that task doesn't launch? Otherwise, what you 
> > are testing is "containerizer update failure" path and not 
> > "executor/framework removed" path.

Umm, I can return Nothing here, but I think since the "executor/framework 
removed" path is visited first, so either will test this path.


> On Aug. 11, 2014, 10:56 p.m., Vinod Kone wrote:
> > src/tests/slave_tests.cpp, line 1314
> > <https://reviews.apache.org/r/22313/diff/24/?file=653349#file653349line1314>
> >
> >     Kill this? Why would there be subsequent updates here?

I remember that last time I ignored the subsequent updates, it will cause the 
tests to fail.
https://issues.apache.org/jira/browse/MESOS-1460

But I have run these tests for more than 3000 times without 
.WillRepeatedly(Return()); They haven't failed yet...


> On Aug. 11, 2014, 10:56 p.m., Vinod Kone wrote:
> > src/slave/slave.cpp, line 1338
> > <https://reviews.apache.org/r/22313/diff/24/?file=653348#file653348line1338>
> >
> >     I think you also want to return immediately if executor is in 
> > TERMINATING/TERMINATED state.

Thanks!
I think I need to add tests to test the case of:
1, the framework is in terminating/terminated.
2, the executor is in terminating/terminated.
3, the executor is removed...

I am not sure if there is any chance that a framework is not NULL but the 
executor is NULL...


- Yifan


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


On Aug. 12, 2014, 6:10 a.m., Yifan Gu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/22313/
> -----------------------------------------------------------
> 
> (Updated Aug. 12, 2014, 6:10 a.m.)
> 
> 
> Review request for mesos, Ian Downes and Vinod Kone.
> 
> 
> Bugs: MESOS-886
>     https://issues.apache.org/jira/browse/MESOS-886
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> Added __runTask() to wait for the completion of containerizer->update() and 
> check the result before sending RunTaskMessage.
> 
> 
> Diffs
> -----
> 
>   src/slave/slave.hpp 9d4607e 
>   src/slave/slave.cpp 787bd05 
>   src/tests/slave_tests.cpp 69be28f 
> 
> Diff: https://reviews.apache.org/r/22313/diff/
> 
> 
> Testing
> -------
> 
> SlaveTest.WillNotLaunchTaskBeforeContainerizerUpdate
> SlaveTest.WillNotLaunchTaskIfFrameworkIsRemoved
> SlaveTest.LaunchTaskAfterContainerizerUpdate
> 
> ./bin/mesos-tests.sh --gtest_repeat=-1 --gtest_break_on_failure 
> --gtest_filter=*LaunchTask*
> 
> successful times > 2000
> 
> make check
> 
> 
> File Attachments
> ----------------
> 
> framework will exit
>   
> https://reviews.apache.org/media/uploaded/files/2014/06/18/fbe73273-7aa9-4faa-b1c5-003ab03042a9__issue-886.diff
> log
>   
> https://reviews.apache.org/media/uploaded/files/2014/06/18/84d801a0-5c2a-4bb9-901b-e1962031461c__log
> 
> 
> Thanks,
> 
> Yifan Gu
> 
>

Reply via email to